Created
December 11, 2017 22:05
-
-
Save nicknmejia/69519afb080fd4e1fa6d64e328c318f6 to your computer and use it in GitHub Desktop.
Nginx config for SLR Lounge assets
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
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