Skip to content

Instantly share code, notes, and snippets.

@benpohdigital
Forked from mckernanin/nginx.conf
Last active February 6, 2023 11:07
Show Gist options
  • Save benpohdigital/0c51aba5b724b7c92304ff757136cd89 to your computer and use it in GitHub Desktop.
Save benpohdigital/0c51aba5b724b7c92304ff757136cd89 to your computer and use it in GitHub Desktop.
Example nginx config to get WordPress uploads from remote if they don't exist locally
# save space, and grab uploads from the live site
location /app/uploads/ {
if (!-e $request_filename){
rewrite ^/app/uploads/(.*) http://yourlivesite.com/app/uploads/$1 redirect;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment