Merge pull request #2167 from coreos-inc/better-nginx-logs

Enable full debuggable logs on non-proxy protocol nginx config
This commit is contained in:
josephschorr 2016-11-28 17:00:49 -05:00 committed by GitHub
commit 1c3012a538
3 changed files with 10 additions and 6 deletions

View file

@ -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;

View file

@ -10,5 +10,7 @@ http {
include server-base.conf;
listen 80 default;
access_log /dev/stdout lb_logs;
}
}

View file

@ -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;
}
}