Skip to content

Instantly share code, notes, and snippets.

@ridiculous
Created June 17, 2017 02:30
Show Gist options
  • Save ridiculous/27e0a2b8a46c95bce61f4850a7383e08 to your computer and use it in GitHub Desktop.
Save ridiculous/27e0a2b8a46c95bce61f4850a7383e08 to your computer and use it in GitHub Desktop.
upstream app {
server unix:/tmp/unicorn.prism.sock fail_timeout=0;
}
server {
listen 8081;
server_name localhost;
location / {
root /Users/rbuckley/apps/prism/public;
index index.html index.htm;
# ADDED BY MEEE
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://127.0.0.1:3000;
add_header X-Ryan foo;
client_body_buffer_size 0;
client_max_body_size 0;
proxy_http_version 1.1;
proxy_request_buffering off;
}
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
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://127.0.0.1:3000;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment