File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,6 +120,24 @@ set_real_ip_from 10.0.0.0/8;
120120real_ip_header X-Forwarded-For;
121121` ` `
122122
123+ # # NGINX Proxy Manager
124+
125+ NGINX Proxy Manager may use a slightly different log format to default NGINX.
126+
127+ ` ` ` nginx
128+ log_format combined ' $remote_addr - $remote_user [$time_local] '
129+ ' "$request" $status $body_bytes_sent '
130+ ' "$http_referer" "$http_user_agent"' ;
131+ ` ` `
132+
133+ It also stores logs in ` /data/logs` .
134+
135+ ` ` ` env
136+ NGINX_ANALYTICS_LOG_FORMAT=' $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'
137+ NGINX_ANALYTICS_ACCESS_PATH=/data/logs
138+ NGINX_ANALYTICS_ERROR_PATH=/data/logs
139+ ` ` `
140+
123141# # Docker
124142
125143If your NGINX instance runs inside a Docker container, you' ll need to mount the log directory to ensure logs are persisted outside of the container.
You can’t perform that action at this time.
0 commit comments