Created
September 20, 2018 07:41
-
-
Save junaidbhura/e4a159df578a688965329bcacda900b1 to your computer and use it in GitHub Desktop.
Nginx Remote WordPress Images for Local Development
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 ~ ^/wp-content/uploads/[^\/]*/.*$ { | |
log_not_found off; | |
try_files $uri $uri/ @production; | |
} | |
location @production { | |
rewrite ^/wp-content/uploads/(.*)$ https://<bucket-name>.s3.amazonaws.com/uploads/$1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment