diff --git a/conf/hosted-http-base.conf b/conf/hosted-http-base.conf index fa5994e6f..e852b3a81 100644 --- a/conf/hosted-http-base.conf +++ b/conf/hosted-http-base.conf @@ -1,7 +1,17 @@ # vim: ft=nginx server { - listen 80 default_server; + listen 80 default_server proxy_protocol; 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; }