Created
November 16, 2011 21:58
-
-
Save diago/1371590 to your computer and use it in GitHub Desktop.
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
upstream portal { | |
server 127.0.0.1:3000; | |
server 127.0.0.1:3001; | |
} | |
server { | |
listen 80 default_server; | |
server_name _; | |
root /opt/portal/public; | |
error_log /opt/comserve_portal/log/nginx_error.log; | |
access_log /opt/comserve_portal/log/nginx_access.log; | |
location / { | |
try_files $uri @portal; | |
} | |
location @portal { | |
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_redirect off; | |
proxy_pass http://portal; | |
} | |
location ~* \.(jpg|png|gif)$ { | |
expires 30d; | |
} | |
location ~* \.(js|css) { | |
expires 7d; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment