Created
December 18, 2015 00:24
-
-
Save trepmal/a2e5eb2a88d49c39eb65 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
# map block must be outside the server{} block | |
map $host $productionurl { | |
default mainsite.com; | |
## uncomment for multisite | |
# subsite.dev subsite.com; | |
# subsite2.dev subsite2.com; | |
# subsite3.dev subsite3.com; | |
} | |
server { | |
# . . . | |
location ~* \.(png|jpg|jpeg|gif|ico|mp3|mov|tif|tiff|swf)$ { | |
try_files $uri $uri/ @production; | |
} | |
location @production { | |
resolver 8.8.8.8; | |
proxy_pass http://$productionurl/$uri; | |
} | |
# . . . | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment