File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,18 @@ http {
1313 default_type application/octet-stream ;
1414
1515 # 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' ;
16+ log_format path_status '$remote_addr - $remote_user [$time_local] $request $status' ;
17+
18+ # Debug log format - shows Host header details for troubleshooting routing issues
19+ # To use, switch access_log below to use debug_routing instead of path_status
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"' ;
1828
1929 access_log /var/log/nginx/access.log path_status;
2030
You can’t perform that action at this time.
0 commit comments