Skip to content

Instantly share code, notes, and snippets.

@NuckChorris
Forked from anonymous/nginx.conf
Last active September 19, 2016 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NuckChorris/e67ebe0865bb21eca69c897e206185c0 to your computer and use it in GitHub Desktop.
Save NuckChorris/e67ebe0865bb21eca69c897e206185c0 to your computer and use it in GitHub Desktop.
server {
listen 80;
# Proxy settings
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded_For $proxy_add_x_forwarded_for;
location /api/ {
proxy_pass http://server/api/;
}
location / {
proxy_pass http://client/;
}
}
@adam12
Copy link

adam12 commented Sep 19, 2016

proxy_set_header    X-Forwarded-For $remote_addr;
proxy_set_header    X-Forwarded-Proto $scheme;
proxy_set_header    Host $http_host;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment