File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed
Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -12,21 +12,11 @@ http {
1212 include /etc/nginx/mime.types ;
1313 default_type application/octet-stream ;
1414
15- log_format main '$remote_addr - $remote_user [$time_local] "$request" '
16- '$status $body_bytes_sent "$http_referer" '
17- '"$http_user_agent" "$http_x_forwarded_for"' ;
18-
19- # Debug log format - shows Host header details for troubleshooting routing issues
20- log_format debug_routing '$remote_addr [$time_local] "$request" '
21- 'status=$status '
22- 'host="$host" '
23- 'http_host="$http_host" '
24- 'server_name="$server_name" '
25- 'scheme=$scheme '
26- 'x_forwarded_host="$http_x_forwarded_host" '
27- 'x_forwarded_proto="$http_x_forwarded_proto"' ;
28-
29- access_log /var/log/nginx/access.log debug_routing;
15+ # Minimal log format to avoid logging sensitive headers (e.g., Authorization tokens)
16+ # Only logs request URI, status code, and remote address
17+ log_format path_status '$request_uri $status $remote_addr' ;
18+
19+ access_log /var/log/nginx/access.log path_status;
3020
3121 sendfile on;
3222 #tcp_nopush on;
You can’t perform that action at this time.
0 commit comments