[GH-ISSUE #1571] 引用外部容器作为nginx控制模式但实际未生效 #7984

Open
opened 2026-03-12 23:30:21 +03:00 by kerem · 0 comments
Owner

Originally created by @aaayun on GitHub (Mar 3, 2026).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1571

Describe the bug
1、使用了外部容器作为nginx的控制引擎,配置页面上显示是成功的,但在站点页面上请求还是使用nginx UI内部的版本。(见截图1-截图3)
2、在站点配置上添加其他第三方配置时配置正常保存,但是实际上没有生效。当重建容器时会报错,且影响nginx ui内部的nginx服务。(见截图4-截图7)
Expected behavior
使用外部容器中的nginx作为nginx实际运行使用的控制引擎。
Screenshots
-- 截图1:配置页面上显示 --
Image
-- 截图2:外部docker容器版本为nginx version: openresty/1.27.1.1 --
Image
-- 截图3:配置的站点使用的是nginx UI内部的nginx/1.29.5 --
Image

-- 截图4:保存配置时成功提示 --
Image
-- 截图5:保存配置时日志 --
Image
-- 截图6:重建容器时日志 --
Image
-- 截图7:重建容器时影响nginx服务 --
Image

Info (please complete the following information):

  • Server OS: Ubuntu 20.04
  • Server Arch: x86
  • Nginx UI Version: nginx/1.29.5 and openresty/1.27.1.1
  • Your Browser: Chrome
  • docker-compose配置:
    wms_openresty:
    hostname: wms_openresty
    container_name: wms_openresty
    image: wms_openresty:latest
    privileged: true
    networks:
    - wms_net
    links:
    - wms_php:php
    volumes:
    - ./dockerfile/wms-nginx-site.conf:/etc/nginx/conf.d/default.conf
    - ./dockerfile/wms-nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf
    - ./storage/app/public:/var/www/public/storage
    - ./index.php:/var/www/public/index.php
    restart: always
    logging:
    driver: "json-file"
    options:
    max-size: "5g"
    wms_nginx_ui:
    hostname: wms_nginx_ui
    container_name: wms_nginx_ui
    privileged: true
    image: uozi/nginx-ui:latest
    restart: always
    networks:
    - wms_net
    links:
    - wms_php:wms_php
    ports:
    - '9091:8081'
    - '9090:9000'
    - '127.0.0.1:51820:51820'
    volumes:
    - ./index.php:/var/www/public/index.php
    - ./docker-data/nginx:/etc/nginx
    - ./docker-data/nginx-ui:/etc/nginx-ui
    - /var/run/docker.sock:/var/run/docker.sock
    environment:
    NGINX_UI_NGINX_CONTAINER_NAME: wms_openresty
    NGINX_UI_SERVER_PORT: 9000
    NGINX_UI_SERVER_RUN_MODE: release
    NGINX_UI_NGINX_PID_PATH: /usr/local/openresty/nginx/logs/nginx.pid
    NGINX_UI_NGINX_ACCESS_LOG_PATH: /var/log/nginx/access.log
    NGINX_UI_NGINX_ERROR_LOG_PATH: /var/log/nginx/error.log
    NGINX_UI_NGINX_SBIN_PATH: /usr/local/openresty/nginx/sbin/nginx
Originally created by @aaayun on GitHub (Mar 3, 2026). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1571 **Describe the bug** 1、使用了外部容器作为nginx的控制引擎,配置页面上显示是成功的,但在站点页面上请求还是使用nginx UI内部的版本。(见截图1-截图3) 2、在站点配置上添加其他第三方配置时配置正常保存,但是实际上没有生效。当重建容器时会报错,且影响nginx ui内部的nginx服务。(见截图4-截图7) **Expected behavior** 使用外部容器中的nginx作为nginx实际运行使用的控制引擎。 **Screenshots** -- 截图1:配置页面上显示 -- <img width="880" height="635" alt="Image" src="https://github.com/user-attachments/assets/0ef7ef2d-23f6-4e85-9eed-da795b812e37" /> -- 截图2:外部docker容器版本为nginx version: openresty/1.27.1.1 -- <img width="765" height="68" alt="Image" src="https://github.com/user-attachments/assets/ee2f0f80-be14-4bb2-a85e-84a25f4dea71" /> -- 截图3:配置的站点使用的是nginx UI内部的nginx/1.29.5 -- <img width="520" height="355" alt="Image" src="https://github.com/user-attachments/assets/7467d3eb-6375-4cd7-b9e4-213b5332c627" /> -- 截图4:保存配置时成功提示 -- <img width="1453" height="694" alt="Image" src="https://github.com/user-attachments/assets/c8bbd9f4-4e49-4eda-853f-def27a2980ee" /> -- 截图5:保存配置时日志 -- <img width="886" height="629" alt="Image" src="https://github.com/user-attachments/assets/dbb111f2-a14f-4926-a2bf-d47350e1f295" /> -- 截图6:重建容器时日志 -- <img width="1096" height="724" alt="Image" src="https://github.com/user-attachments/assets/82d0c115-1986-406e-a5d3-0a060ab0f234" /> -- 截图7:重建容器时影响nginx服务 -- <img width="1849" height="423" alt="Image" src="https://github.com/user-attachments/assets/82a1f770-228f-4cd4-ba8d-5f8141631db6" /> **Info (please complete the following information):** - Server OS: Ubuntu 20.04 - Server Arch: x86 - Nginx UI Version: nginx/1.29.5 and openresty/1.27.1.1 - Your Browser: Chrome - docker-compose配置: wms_openresty: hostname: wms_openresty container_name: wms_openresty image: wms_openresty:latest privileged: true networks: - wms_net links: - wms_php:php volumes: - ./dockerfile/wms-nginx-site.conf:/etc/nginx/conf.d/default.conf - ./dockerfile/wms-nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf - ./storage/app/public:/var/www/public/storage - ./index.php:/var/www/public/index.php restart: always logging: driver: "json-file" options: max-size: "5g" wms_nginx_ui: hostname: wms_nginx_ui container_name: wms_nginx_ui privileged: true image: uozi/nginx-ui:latest restart: always networks: - wms_net links: - wms_php:wms_php ports: - '9091:8081' - '9090:9000' - '127.0.0.1:51820:51820' volumes: - ./index.php:/var/www/public/index.php - ./docker-data/nginx:/etc/nginx - ./docker-data/nginx-ui:/etc/nginx-ui - /var/run/docker.sock:/var/run/docker.sock environment: NGINX_UI_NGINX_CONTAINER_NAME: wms_openresty NGINX_UI_SERVER_PORT: 9000 NGINX_UI_SERVER_RUN_MODE: release NGINX_UI_NGINX_PID_PATH: /usr/local/openresty/nginx/logs/nginx.pid NGINX_UI_NGINX_ACCESS_LOG_PATH: /var/log/nginx/access.log NGINX_UI_NGINX_ERROR_LOG_PATH: /var/log/nginx/error.log NGINX_UI_NGINX_SBIN_PATH: /usr/local/openresty/nginx/sbin/nginx
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#7984
No description provided.