mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 08:45:58 +03:00
[GH-ISSUE #153] 在centos8运行时,无法读取到本地已经安装的nginx #3185
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#3185
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @guduyingkod on GitHub (Aug 10, 2023).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/153
报错信息:
2023-08-10 18:02:14 ERROR nginx/nginx.go:46 exec: "nginx": executable file not found in $PATH
2023-08-10 18:02:14 INFO server/server.go:25 Nginx config dir path:
$Path已验证存在nginx,并且nginx命令是可用的。
请问这个报错信息如何解决,目前是访问不了nginx ui的界面
@0xJacky commented on GitHub (Aug 10, 2023):
我看看能不能在虚拟机里复现一下,但是这个不影响访问的问题,建议检查一下端口是否被占用或者防火墙是否阻断端口
@0xJacky commented on GitHub (Aug 10, 2023):
也可以手动指定 Nginx 配置的路径,这样就不会读这个命令
修改 app.ini
···
[nginx]
AccessLogPath = /var/log/nginx/access.log
ErrorLogPath = /var/log/nginx/error.log
ConfigDir =
PIDPath =
ReloadCmd =
RestartCmd =
···
@0xJacky commented on GitHub (Aug 10, 2023):
我刚用 CentOS 8 的镜像装了个虚拟机:https://mirrors.aliyun.com/centos/8/isos/x86_64
yum install nginx安装 nginxsystemctl stop firewalld.service关闭防火墙可以正常使用,且没有报错,您需要补充更多的信息以供我们复现 bug。
@guduyingkod commented on GitHub (Aug 11, 2023):
你好,大佬!我现在重试了一下确实可以看到nginx-ui页面,但是点击站点列表时报错:open : no such file or directory
@guduyingkod commented on GitHub (Aug 11, 2023):
请问这里提到的app.ini 文件是在哪里可以找到?
@0xJacky commented on GitHub (Aug 11, 2023):
/usr/local/etc/nginx-ui/app.ini
@guduyingkod commented on GitHub (Aug 11, 2023):
好的,已经修改了配置文件。目前报了这个错误


以下是当前nginx的配置文件
我应该新建这个缺失的文件/文件夹吗?
@0xJacky commented on GitHub (Aug 11, 2023):
请查看中文文档 https://github.com/0xJacky/nginx-ui/blob/master/README-zh_CN.md#使用前注意
使用前注意
Nginx UI 遵循 Debian 的网页服务器配置文件标准。创建的网站配置文件将会放置于 Nginx 配置文件夹(自动检测)下的 sites-available 中,启用后的网站将会创建一份配置文件软连接到 sites-enabled 文件夹。您可能需要提前调整配置文件的组织方式。
对于非 Debian (及 Ubuntu) 系统,您可能需要将 nginx.conf 配置文件中的内容修改为如下所示的 Debian 风格。
http {
# ...
include /etc/nginx/conf.d/.conf;
include /etc/nginx/sites-enabled/;
}
更多信息请参阅:debian/conf/nginx.conf
@guduyingkod commented on GitHub (Aug 11, 2023):
好的,请问大佬是否能读取到之前已经配置在nginx.conf 里面的配置内容到nginx-ui?
@0xJacky commented on GitHub (Aug 11, 2023):
只能按照这个文件夹组织架构来
@guduyingkod commented on GitHub (Aug 11, 2023):
酱紫,那就要手动迁移配置内容了
@guduyingkod commented on GitHub (Aug 11, 2023):
请问这里应该怎么做才能让nignx-ui关联到nginx?
@0xJacky commented on GitHub (Aug 11, 2023):
因为在你的环境下面 nginx 命令无法执行,所以你需要手动配置 pid 的路径
v2 以上的版本参考
修改 app.ini
···
[nginx]
AccessLogPath = /var/log/nginx/access.log
ErrorLogPath = /var/log/nginx/error.log
ConfigDir =
PIDPath =
ReloadCmd =
RestartCmd =
···
@guduyingkod commented on GitHub (Aug 11, 2023):
好的 已经配置 感谢大佬
@sonicno1 commented on GitHub (Aug 3, 2024):
include vhost/*.conf;的配置文件读取不到,nginx目录下无 sites-enabled 目录
@0xJacky commented on GitHub (Aug 3, 2024):
请查看中文文档 https://github.com/0xJacky/nginx-ui/blob/master/README-zh_CN.md#使用前注意
使用前注意
Nginx UI 遵循 Debian 的网页服务器配置文件标准。创建的网站配置文件将会放置于 Nginx 配置文件夹(自动检测)下的 sites-available 中,启用后的网站将会创建一份配置文件软连接到 sites-enabled 文件夹。您可能需要提前调整配置文件的组织方式。
对于非 Debian (及 Ubuntu) 系统,您可能需要将 nginx.conf 配置文件中的内容修改为如下所示的 Debian 风格。
http {
...
include /etc/nginx/conf.d/.conf;
include /etc/nginx/sites-enabled/;
}
更多信息请参阅:debian/conf/nginx.conf