Skip to content

Instantly share code, notes, and snippets.

@waldher
Created April 24, 2013 16:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save waldher/5453375 to your computer and use it in GitHub Desktop.
Save waldher/5453375 to your computer and use it in GitHub Desktop.
nginx config for use with node and unix sockets
upstream app {
server unix:/home/user/application/tmp/socket fail_timeout=0;
}
server {
listen 80;
server_name example.com;
root /home/user/application/public;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;
proxy_redirect off;
if (!-f $request_filename) {
proxy_pass http://app;
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment