Created
April 24, 2013 16:13
-
-
Save waldher/5453375 to your computer and use it in GitHub Desktop.
nginx config for use with node and unix sockets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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