Created
August 16, 2017 19:13
-
-
Save alexpgates/fbeee353e063fc5b397573b04e48ebe1 to your computer and use it in GitHub Desktop.
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
# Use this to avoid syncing wp-uploads directory when working locally on a WordPress website | |
# Directives to send expires headers and turn off 404 error logging. | |
location ~* \.(js|css|png|jpe?g|gif|ico)$ { | |
expires 24h; | |
log_not_found off; | |
try_files $uri $uri/ @production; | |
} | |
location @production { | |
resolver 8.8.4.4; | |
proxy_pass http://production-url.com/$uri; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment