proxy_protocol logging and support
This commit is contained in:
parent
e7054a8690
commit
f6d1ffd2c8
1 changed files with 11 additions and 1 deletions
|
@ -1,7 +1,17 @@
|
||||||
# vim: ft=nginx
|
# vim: ft=nginx
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80 default_server;
|
listen 80 default_server proxy_protocol;
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
|
set_real_ip from 0.0.0.0/0;
|
||||||
|
real_ip_header proxy_protocol;
|
||||||
|
|
||||||
|
log_format elb '$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;
|
||||||
|
|
||||||
rewrite ^ https://$host$request_uri? permanent;
|
rewrite ^ https://$host$request_uri? permanent;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue