Skip to content

Instantly share code, notes, and snippets.

@redrush85
Created January 17, 2017 17:13
Show Gist options
  • Save redrush85/23b25a77c224eeb6c23ed895684c59a1 to your computer and use it in GitHub Desktop.
Save redrush85/23b25a77c224eeb6c23ed895684c59a1 to your computer and use it in GitHub Desktop.
nginx.conf
# proxy with real-ip
location / {
proxy_pass http://upstream_server;
proxy_pass_header Server;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header REMOTE_ADDR $remote_addr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment