[GH-ISSUE #606] 请问日志总是显示不出来? #1651

Closed
opened 2026-02-27 12:12:22 +03:00 by kerem · 13 comments
Owner

Originally created by @joylijoy on GitHub (Oct 10, 2024).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/606

在LogDirWhiteList =处填的是nginx的日志路径,但登陆nignx-ui后,显示The log path is not under the paths in LogDirWhiteList. 是为什么,谢谢

Originally created by @joylijoy on GitHub (Oct 10, 2024). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/606 在LogDirWhiteList =处填的是nginx的日志路径,但登陆nignx-ui后,显示The log path is not under the paths in LogDirWhiteList. 是为什么,谢谢
kerem closed this issue 2026-02-27 12:12:22 +03:00
Author
Owner

@0xJacky commented on GitHub (Oct 10, 2024):

填写的是日志的文件夹路径

<!-- gh-comment-id:2404532857 --> @0xJacky commented on GitHub (Oct 10, 2024): 填写的是日志的文件夹路径
Author
Owner

@joylijoy commented on GitHub (Oct 10, 2024):

填写的是日志的文件夹路径

我填的是这个呀,就是存放nginx的access.log和error.log的日志的路径对吧?

<!-- gh-comment-id:2404553206 --> @joylijoy commented on GitHub (Oct 10, 2024): > 填写的是日志的文件夹路径 我填的是这个呀,就是存放nginx的access.log和error.log的日志的路径对吧?
Author
Owner

@0xJacky commented on GitHub (Oct 10, 2024):

不是,填的是文件夹的路径,然后改完记得 restart nginx-ui

<!-- gh-comment-id:2404556534 --> @0xJacky commented on GitHub (Oct 10, 2024): 不是,填的是文件夹的路径,然后改完记得 restart nginx-ui
Author
Owner

@joylijoy commented on GitHub (Oct 10, 2024):

不是,填的是文件夹的路径,然后改完记得 restart nginx-ui

填完了日志文件夹的路径后,报这个问题:log file is not regular file
image

<!-- gh-comment-id:2404572141 --> @joylijoy commented on GitHub (Oct 10, 2024): > 不是,填的是文件夹的路径,然后改完记得 restart nginx-ui 填完了日志文件夹的路径后,报这个问题:log file is not regular file ![image](https://github.com/user-attachments/assets/11ee3af7-025f-44b5-8096-f2c388f83581)
Author
Owner

@0xJacky commented on GitHub (Oct 10, 2024):

/apps/openresty/nginx/logs 这个文件是软连接吗?

<!-- gh-comment-id:2404595605 --> @0xJacky commented on GitHub (Oct 10, 2024): /apps/openresty/nginx/logs 这个文件是软连接吗?
Author
Owner

@joylijoy commented on GitHub (Oct 10, 2024):

/apps/openresty/nginx/logs 这个文件是软连接吗?

不是,是真实的文件夹
image

<!-- gh-comment-id:2404607132 --> @joylijoy commented on GitHub (Oct 10, 2024): > /apps/openresty/nginx/logs 这个文件是软连接吗? 不是,是真实的文件夹 ![image](https://github.com/user-attachments/assets/da855929-e9f5-483c-912a-a68028085098)
Author
Owner

@0xJacky commented on GitHub (Oct 10, 2024):

只支持单个文件

比如

AccessLogPath = /var/logs/nginx/access.log
LogDirWhiteList = /var/logs/nginx

<!-- gh-comment-id:2404608106 --> @0xJacky commented on GitHub (Oct 10, 2024): 只支持单个文件 比如 AccessLogPath = /var/logs/nginx/access.log LogDirWhiteList = /var/logs/nginx
Author
Owner

@joylijoy commented on GitHub (Oct 10, 2024):

只支持单个文件

比如

AccessLogPath = /var/logs/nginx/access.log LogDirWhiteList = /var/logs/nginx

可以了,谢谢!

<!-- gh-comment-id:2404624849 --> @joylijoy commented on GitHub (Oct 10, 2024): > 只支持单个文件 > > 比如 > > AccessLogPath = /var/logs/nginx/access.log LogDirWhiteList = /var/logs/nginx 可以了,谢谢!
Author
Owner

@xlcaptain commented on GitHub (Nov 7, 2024):

微信截图_20241107230219
如果是docker-compose来启动服务的话,这个LogDirWhiteList设置以环境变量不太行,这怎么办呢?是需要在容器中修改app.ini的配置吗?在容器中我没有找到go的app.ini这个配置文件,请问能够解答吗?

<!-- gh-comment-id:2462468605 --> @xlcaptain commented on GitHub (Nov 7, 2024): ![微信截图_20241107230219](https://github.com/user-attachments/assets/58b8c94a-9378-4d6a-9a1c-28e2167e3e6d) 如果是docker-compose来启动服务的话,这个LogDirWhiteList设置以环境变量不太行,这怎么办呢?是需要在容器中修改app.ini的配置吗?在容器中我没有找到go的app.ini这个配置文件,请问能够解答吗?
Author
Owner

@xlcaptain commented on GitHub (Nov 7, 2024):

@0xJacky

<!-- gh-comment-id:2462469601 --> @xlcaptain commented on GitHub (Nov 7, 2024): @0xJacky
Author
Owner

@0xJacky commented on GitHub (Nov 7, 2024):

@xlcaptain 文档要看全,
https://nginxui.com/zh_CN/guide/env.html#nginx

image

NGINX_UI_NGINX_LOG_DIR_WHITE_LIST

<!-- gh-comment-id:2462474160 --> @0xJacky commented on GitHub (Nov 7, 2024): @xlcaptain 文档要看全, https://nginxui.com/zh_CN/guide/env.html#nginx <img width="654" alt="image" src="https://github.com/user-attachments/assets/8f3efad7-456f-4ccd-a91b-06520c48ce52"> `NGINX_UI_NGINX_LOG_DIR_WHITE_LIST`
Author
Owner

@xlcaptain commented on GitHub (Nov 7, 2024):

@0xJacky 明白了,谢谢。配置似乎成功:
微信截图_20241107235554
但是,日志中没有产生日志,我已经成功在nginx-ui中配置了我的个人网站的转发,并且能够成功获取,但是没有日志:
微信截图_20241107235607
以下是我的终端docker-compose日志以及容器中就日志文件的权限截图:
微信截图_20241107235751
微信截图_20241107235924

望查看,十分感谢您的回答!

<!-- gh-comment-id:2462617692 --> @xlcaptain commented on GitHub (Nov 7, 2024): @0xJacky 明白了,谢谢。配置似乎成功: ![微信截图_20241107235554](https://github.com/user-attachments/assets/14a98d7e-2a74-4e9e-afdd-e4127711103c) 但是,日志中没有产生日志,我已经成功在nginx-ui中配置了我的个人网站的转发,并且能够成功获取,但是没有日志: ![微信截图_20241107235607](https://github.com/user-attachments/assets/dfacb904-e739-4503-b8fc-c753f663738f) 以下是我的终端docker-compose日志以及容器中就日志文件的权限截图: ![微信截图_20241107235751](https://github.com/user-attachments/assets/aaae0cb5-c5b1-4026-9600-a896742c6f95) ![微信截图_20241107235924](https://github.com/user-attachments/assets/78b24366-0ade-4ac9-8326-15a014061706) 望查看,十分感谢您的回答!
Author
Owner

@xlcaptain commented on GitHub (Nov 8, 2024):

微信截图_20241108094414
已找到原因,需要根据你的nginx配置的log路劲来进行填写

<!-- gh-comment-id:2463589011 --> @xlcaptain commented on GitHub (Nov 8, 2024): ![微信截图_20241108094414](https://github.com/user-attachments/assets/d7dbbb18-aec3-4b1b-aefc-246b045b4614) 已找到原因,需要根据你的nginx配置的log路劲来进行填写
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#1651
No description provided.