Skip to content

Instantly share code, notes, and snippets.

@nicknmejia
Created December 11, 2017 22:05
Show Gist options
  • Save nicknmejia/69519afb080fd4e1fa6d64e328c318f6 to your computer and use it in GitHub Desktop.
Save nicknmejia/69519afb080fd4e1fa6d64e328c318f6 to your computer and use it in GitHub Desktop.
Nginx config for SLR Lounge assets
server {
listen 80;
listen 443 ssl;
server_name slrlounge.dev *.slrlounge.dev ~^build\.slrlounge\.\d+\.\d+\.\d+\.\d+\.xip\.io$;
root /srv/www/slr-lounge/src;
include /etc/nginx/nginx-wp-common.conf;
location ~ "^(.*)/wp-content/uploads/(.*)$" {
try_files $uri @missing;
}
location @missing {
rewrite "^(.*)/wp-content/uploads/(.*)$" "https://www.slrlounge.com/wp-content/uploads/$2" redirect;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment