Skip to content

Commit c65310f

Browse files
keep debug routing
1 parent 01a1a41 commit c65310f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tools/reverse-proxy/nginx.conf

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)