deploy/templates/nginx.static.conf.j2
changeset 184 aac6db7cea99
parent 180 62bffc051e1c
child 186 3458941945e0
--- a/deploy/templates/nginx.static.conf.j2	Fri Nov 30 10:53:15 2018 +0100
+++ b/deploy/templates/nginx.static.conf.j2	Fri Nov 30 14:49:19 2018 +0100
@@ -30,15 +30,15 @@
         include /etc/nginx/uwsgi_params;
     }
 
-    location /backend/static {
+    location {{'/' if static_url_base=='' else static_url_base}}backend/static {
         alias {{backend_nginx_static_root}}; # backend static files
     }
 
-    location /backend/media {
+    location {{'/' if static_url_base=='' else static_url_base}}backend/media {
         alias {{backend_nginx_media_root}};  # backend media files
     }
 
-    location / {
+    location {{'/' if static_url_base=='' else static_url_base}} {
         # First attempt to serve request as file, then
         # as directory, then fall back to displaying a 404.
         try_files $uri $uri/ /index.html;