From: Thomas Fillon Date: Wed, 24 May 2017 22:22:28 +0000 (+0200) Subject: Differentiate media access protection through Nginx X-Git-Tag: search~2^2~19^2~3 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=da3af85ed731a11d98d70c188fb97eee93a4b515;p=telemeta.git Differentiate media access protection through Nginx --- diff --git a/etc/nginx.conf b/etc/nginx.conf index 4c1df0cb..c09e32f4 100644 --- a/etc/nginx.conf +++ b/etc/nginx.conf @@ -12,6 +12,22 @@ server { client_max_body_size 4096M; # adjust to taste # Django media + location /media { + alias /srv/media; # your Django project's media files - amend as required + # Django media export + location /media/export { + internal; # protect media files directory only accessible through Django + alias /srv/media/export; + } + # Django media items + location /media/items { + internal; # protect media files directory only accessible through Django + alias /srv/media/items; + } + + } + +# Django media location /media { internal; # protect media files directory only accessible through Django alias /srv/media; # your Django project's media files - amend as required