]> git.parisson.com Git - telemeta.git/commitdiff
Differentiate media access protection through Nginx
authorThomas Fillon <thomas@parisson.com>
Wed, 24 May 2017 22:22:28 +0000 (00:22 +0200)
committerThomas Fillon <thomas@parisson.com>
Wed, 24 May 2017 22:24:09 +0000 (00:24 +0200)
etc/nginx.conf

index 4c1df0cb9c5e4e00720f6a319bd4c1cf1e918154..c09e32f450a65ec9e7bd8ec1cd92c1e3082802b6 100644 (file)
@@ -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