Skip to content

Instantly share code, notes, and snippets.

@kkeybbs
Last active April 11, 2017 00:18
Show Gist options
  • Save kkeybbs/8c49f0a0b8c6a546ee9e8eb01bb9f1f7 to your computer and use it in GitHub Desktop.
Save kkeybbs/8c49f0a0b8c6a546ee9e8eb01bb9f1f7 to your computer and use it in GitHub Desktop.
nginx reverse proxy
location /test/ {
proxy_pass http://test:9000;
# include conf.d/proxy.txt;
proxy_redirect off;
proxy_pass_request_headers on;
proxy_pass_header Server;
real_ip_header X-Real-IP;
# proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment