Created
December 13, 2013 03:38
-
-
Save qianduan/7939466 to your computer and use it in GitHub Desktop.
nginx reverse proxy for node.js
This file contains 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
log_format snake.isux.us '$remote_addr - $remote_user [$time_local] $request' | |
'$status $body_bytes_sent $http_referer' | |
'$http_user_agent $http_x_forwarded_for'; | |
upstream snake.isux.us{ | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80; | |
server_name snake.isux.us; | |
root /home/www/snake/; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header host $http_host; | |
proxy_set_header X-NginX-Proxy true; | |
proxy_pass http://snake.isux.us; | |
proxy_redirect off; | |
} | |
access_log /home/wwwlogs/snake.isux.log snake.isux.us; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment