-
-
Save cam-gists/2795693 to your computer and use it in GitHub Desktop.
Node.JS: app under nginx
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
# node.js app under nginx | |
upstream node { | |
server 127.0.0.1:8001; | |
} | |
server { | |
listen 80; | |
server_name node; | |
access_log /var/log/nginx/node.access.log; | |
location / { | |
root /home/user/nodejs; | |
fastcgi_pass 127.0.0.1:8001; | |
proxy_pass http://node/; | |
include /etc/nginx/fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME /home/user/nodejs/$fastcgi_script_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment