Last active
October 6, 2023 09:01
-
-
Save chuckreynolds/35bcec4323d314a7fff5a1d3fcd357bd to your computer and use it in GitHub Desktop.
Local NGINX WordPress Media Uploads Fallback. Substitute {PROD} for the domain to use images from.
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
location ~* ^.+\.(svg|svgz|jpg|jpeg|gif|png|ico|bmp)$ { | |
try_files $uri @image_fallback; | |
} | |
location @image_fallback { | |
proxy_pass http://{PROD}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FYI - For Laravel custom nginx see: https://medium.com/@maxxscho/laravel-homestead-with-custom-nginx-configurations-2e0fda4ba7dc