Add and include proxy-protocol.conf
This commit is contained in:
parent
e93d0b83ec
commit
365290d3c4
2 changed files with 11 additions and 1 deletions
|
@ -10,9 +10,11 @@ http {
|
|||
include rate-limiting.conf;
|
||||
|
||||
server {
|
||||
include proxy-protocol.conf;
|
||||
|
||||
include server-base.conf;
|
||||
|
||||
listen 443 default;
|
||||
listen 443 default proxy_protocol;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate ./stack/ssl.cert;
|
||||
|
|
8
conf/proxy-protocol.conf
Normal file
8
conf/proxy-protocol.conf
Normal file
|
@ -0,0 +1,8 @@
|
|||
# vim: ft=nginx
|
||||
|
||||
set_real_ip_from 10.0.0.0/8
|
||||
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 /var/log/nginx/nginx.access.log elb_pp;
|
Reference in a new issue