Skip to content

Instantly share code, notes, and snippets.

@phoffer
Created June 15, 2015 22:24
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 phoffer/83e3eb47afe0f01b624a to your computer and use it in GitHub Desktop.
Save phoffer/83e3eb47afe0f01b624a to your computer and use it in GitHub Desktop.
nginx sample
server {
listen 80;
server_name localhost mc.local;
root /Users/paul/Projects/mc/public;
try_files $uri/index.html $uri @app;
# Send everything to the app defined in the upstream
location /todo {
proxy_pass http://127.0.0.1:4567/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://app;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment