diff --git a/binary_dependencies/nginx_1.8.0-1_amd64.deb b/binary_dependencies/nginx_1.8.0-1_amd64.deb index 8f15911c1..d57da9f3a 100644 Binary files a/binary_dependencies/nginx_1.8.0-1_amd64.deb and b/binary_dependencies/nginx_1.8.0-1_amd64.deb differ diff --git a/conf/http-base.conf b/conf/http-base.conf index 3c3d57372..b7b2f01a9 100644 --- a/conf/http-base.conf +++ b/conf/http-base.conf @@ -1,5 +1,12 @@ # vim: ft=nginx +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"' + types_hash_max_size 2048; include /usr/local/nginx/conf/mime.types.default; diff --git a/conf/nginx.conf b/conf/nginx.conf index 5e49b1977..ebbed4e47 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -26,18 +26,19 @@ http { # This header must be set only for HTTPS add_header Strict-Transport-Security "max-age=63072000; preload"; - } server { - include proxy-protocol.conf; include server-base.conf; listen 8443 default proxy_protocol; - ssl on; # This header must be set only for HTTPS add_header Strict-Transport-Security "max-age=63072000; preload"; + + real_ip_header proxy_protocol; + + access_log /dev/stdout lb_pp; } } diff --git a/conf/proxy-protocol.conf b/conf/proxy-protocol.conf deleted file mode 100644 index ba00507f5..000000000 --- a/conf/proxy-protocol.conf +++ /dev/null @@ -1,8 +0,0 @@ -# vim: ft=nginx - -set_real_ip_from 0.0.0.0/0; -real_ip_header proxy_protocol; -log_format elb_pp '$proxy_protocol_addr - $remote_user [$time_local] ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent"'; -access_log /dev/stdout elb_pp;