Skip to content

通过 docker 容器安装的 nginx-ui 在检查站点文件时的问题 #1278

@bigoovip

Description

@bigoovip

Describe the bug

假设站点的配置如下:

server {	listen 80;	server_name site1.example.com;	include /etc/nginx/conf99/test1.conf;	include conf99/test2.conf;	location / {	return 200 "This is Site 1";	} } 

当在这个站点的web页面从高级模式切换为基本模式时,或点击编辑显示基本模式时,会提示以下内容:

stat /etc/nginx/etc/nginx/conf99/test1.conf: no such file or directory stat /etc/nginx/conf99/test2.conf: no such file or directory 

问题有2个:

  1. 不管 include 的路径是绝对路径还是相对路径(相对前缀目录),都被自动添加了前缀/etc/nginx
  2. 在 nginx-ui 容器内部,通过执行ls相关命令可以明确看到目录和文件存在,但却提示“no such file or directory”。

To Reproduce

  1. 进入站点列表
  2. 点击该站点的编辑按钮
  3. 如果直接显示基本模式时,会出现此提示
  4. 如果显示高级模式,则关闭高级模式显示基本模式时,会出现此提示

Expected behavior

期望不要出现错误的提示

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions