Created Nginx Log Configuration (markdown)

Jacky 2022-09-01 10:46:40 +08:00
parent 25c592e5b1
commit 461d6bddce

@ -0,0 +1,36 @@
Set nginx access log and error log path in `app.ini` then restart nginx-ui.
Example:
```
[nginx_log]
AccessLogPath = /var/log/nginx/access.log
ErrorLogPath = /var/log/nginx/error.log
```
For nginx-ui **docker** users, if you upgrading from `v1.5.2` or lower version,
please add another `access_log` and `error_log` directive in your `nginx.conf` before setting the `app.ini`.
Because in nginx-ui container, `/var/log/nginx/access.log` is a symlink point to `/dev/stdout`, `/var/log/nginx/error.log` is a symlink point to `/dev/stderr`, so that you can view the nginx and nginx-ui log by using `docker logs nginx-ui`, but these two devices are not allow to tail, so we must
use another log file to record nginx logs.
Example:
```
error_log /var/log/nginx/error.log notice;
error_log /var/log/nginx/error.local.log notice;
http {
...
access_log /var/log/nginx/access.log main;
access_log /var/log/nginx/access.local.log main;
...
}
```
Then, set nginx access log and error log path in `app.ini` and restart nginx-ui.
Example:
```
[nginx_log]
AccessLogPath = /var/log/nginx/access.local.log
ErrorLogPath = /var/log/nginx/error.local.log
```