Last active
May 14, 2019 18:02
-
-
Save jeremyfelt/08df225addf33f382341 to your computer and use it in GitHub Desktop.
Nginx configuration to proxy 404 files locally to a production domain
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
# Adjust this to include any other necessary files. | |
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { | |
expires 24h; | |
log_not_found off; | |
try_files $uri $uri/ @production; | |
} | |
location @production { | |
resolver 1.1.1.1; | |
proxy_pass http://{replace-with.domain.com}/$uri; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment