From 2726405ea5bb7bcaf35794c4d602f48e5a7e447f Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 28 Nov 2016 16:29:35 -0500 Subject: [PATCH] Enable full debuggable logs on non-proxy protocol nginx config Fixes #2037 --- conf/nginx/http-base.conf | 10 +++++----- conf/nginx/nginx-nossl.conf | 2 ++ conf/nginx/nginx.conf | 4 +++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/conf/nginx/http-base.conf b/conf/nginx/http-base.conf index 7ceba1497..5f27de930 100644 --- a/conf/nginx/http-base.conf +++ b/conf/nginx/http-base.conf @@ -2,11 +2,11 @@ set_real_ip_from 0.0.0.0/0; real_ip_recursive on; -log_format lb_pp '$remote_addr ($proxy_protocol_addr) ' - '- $remote_user [$time_local] ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '($request_time $request_length $upstream_response_time)'; +log_format lb_logs '$remote_addr ($proxy_protocol_addr) ' + '- $remote_user [$time_local] ' + '"$request" $status $body_bytes_sent ' + '"$http_referer" "$http_user_agent" ' + '($request_time $request_length $upstream_response_time)'; types_hash_max_size 2048; include /etc/nginx/mime.types; diff --git a/conf/nginx/nginx-nossl.conf b/conf/nginx/nginx-nossl.conf index 549f4b4e8..4799bf4aa 100644 --- a/conf/nginx/nginx-nossl.conf +++ b/conf/nginx/nginx-nossl.conf @@ -10,5 +10,7 @@ http { include server-base.conf; listen 80 default; + + access_log /dev/stdout lb_logs; } } diff --git a/conf/nginx/nginx.conf b/conf/nginx/nginx.conf index f5d39d2ab..fcb9f01e2 100644 --- a/conf/nginx/nginx.conf +++ b/conf/nginx/nginx.conf @@ -30,6 +30,8 @@ http { # This header must be set only for HTTPS add_header Strict-Transport-Security "max-age=63072000; preload"; + + access_log /dev/stdout lb_logs; } server { @@ -43,6 +45,6 @@ http { real_ip_header proxy_protocol; - access_log /dev/stdout lb_pp; + access_log /dev/stdout lb_logs; } }