Created
July 2, 2018 20:34
-
-
Save ninapavlich/b59381be166d43adba3d2341a8ee6c94 to your computer and use it in GitHub Desktop.
Serve media from multiple directories
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 { | |
.... | |
location ~ /media/([a-zA-Z0-9\-_\/\.]+)$ { | |
root /var/www/mysite/; | |
try_files /media/$1 /uploads/$1 =404; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment