Skip to content

引用外部容器作为nginx控制模式但实际未生效 #1571

@aaayun

Description

@aaayun

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions