Created
May 24, 2014 20:48
-
-
Save JuneKelly/42d75b947c19dfa5d9d4 to your computer and use it in GitHub Desktop.
Nginx conf for a proxied site
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
server { | |
listen 80; | |
server_name {{SERVER_NAME}}; | |
location / { | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass http://localhost:{{PORT}}/; | |
} | |
location /static/ { | |
access_log off; | |
log_not_found off; | |
add_header Pragma "public"; | |
add_header Cache-Control "public"; | |
expires modified 10d; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass http://localhost:{{PORT}}/static/; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment