From 01a1a4188ba5867c9f74178c3a21e1ad03c14d1c Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Tue, 16 Dec 2025 15:53:38 -0700 Subject: [PATCH 1/3] minimal log format --- tools/reverse-proxy/nginx.conf | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/tools/reverse-proxy/nginx.conf b/tools/reverse-proxy/nginx.conf index 8089caf..414e733 100644 --- a/tools/reverse-proxy/nginx.conf +++ b/tools/reverse-proxy/nginx.conf @@ -12,21 +12,11 @@ http { include /etc/nginx/mime.types; default_type application/octet-stream; - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - # Debug log format - shows Host header details for troubleshooting routing issues - log_format debug_routing '$remote_addr [$time_local] "$request" ' - 'status=$status ' - 'host="$host" ' - 'http_host="$http_host" ' - 'server_name="$server_name" ' - 'scheme=$scheme ' - 'x_forwarded_host="$http_x_forwarded_host" ' - 'x_forwarded_proto="$http_x_forwarded_proto"'; - - access_log /var/log/nginx/access.log debug_routing; + # Minimal log format to avoid logging sensitive headers (e.g., Authorization tokens) + # Only logs request URI, status code, and remote address + log_format path_status '$request_uri $status $remote_addr'; + + access_log /var/log/nginx/access.log path_status; sendfile on; #tcp_nopush on; From c65310f6ebdc553deb5bf51d22bceabcfa241bb2 Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Tue, 16 Dec 2025 15:58:41 -0700 Subject: [PATCH 2/3] keep debug routing --- tools/reverse-proxy/nginx.conf | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/reverse-proxy/nginx.conf b/tools/reverse-proxy/nginx.conf index 414e733..448e171 100644 --- a/tools/reverse-proxy/nginx.conf +++ b/tools/reverse-proxy/nginx.conf @@ -13,8 +13,18 @@ http { default_type application/octet-stream; # Minimal log format to avoid logging sensitive headers (e.g., Authorization tokens) - # Only logs request URI, status code, and remote address - log_format path_status '$request_uri $status $remote_addr'; + log_format path_status '$remote_addr - $remote_user [$time_local] $request $status'; + + # Debug log format - shows Host header details for troubleshooting routing issues + # To use, switch access_log below to use debug_routing instead of path_status + log_format debug_routing '$remote_addr [$time_local] "$request" ' + 'status=$status ' + 'host="$host" ' + 'http_host="$http_host" ' + 'server_name="$server_name" ' + 'scheme=$scheme ' + 'x_forwarded_host="$http_x_forwarded_host" ' + 'x_forwarded_proto="$http_x_forwarded_proto"'; access_log /var/log/nginx/access.log path_status; From 9a3b3ca9ffb6a512c54f41663ad29839440649ca Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Tue, 16 Dec 2025 15:59:16 -0700 Subject: [PATCH 3/3] remove comment not needed --- tools/reverse-proxy/nginx.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/reverse-proxy/nginx.conf b/tools/reverse-proxy/nginx.conf index 448e171..4ebd160 100644 --- a/tools/reverse-proxy/nginx.conf +++ b/tools/reverse-proxy/nginx.conf @@ -12,7 +12,6 @@ http { include /etc/nginx/mime.types; default_type application/octet-stream; - # Minimal log format to avoid logging sensitive headers (e.g., Authorization tokens) log_format path_status '$remote_addr - $remote_user [$time_local] $request $status'; # Debug log format - shows Host header details for troubleshooting routing issues