From 4657dd0f1d47b882eb7dc89d3f8762600dd75bd0 Mon Sep 17 00:00:00 2001 From: Emmanuel Cazenave Date: Wed, 6 Apr 2022 16:17:49 +0200 Subject: [PATCH] nginx/wcs: search for static files in the 'tenants' directory (#63638) --- roles/nginx-setup/templates/wcs-nginx-server.j2 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/roles/nginx-setup/templates/wcs-nginx-server.j2 b/roles/nginx-setup/templates/wcs-nginx-server.j2 index 6f65b53..aaaaf20 100644 --- a/roles/nginx-setup/templates/wcs-nginx-server.j2 +++ b/roles/nginx-setup/templates/wcs-nginx-server.j2 @@ -2,11 +2,13 @@ {% block middle %} location ~ ^/static/(.+)$ { - root /; - try_files {{state_dir}}/$host/static/$1 - {{state_dir}}/$host/theme/static/$1 - {{state_dir}}/collectstatic/$1 - =404; + root /; + try_files {{state_dir}}/tenants/$host/static/$1 + {{state_dir}}/tenants/$host/theme/static/$1 + {{state_dir}}/$host/static/$1 + {{state_dir}}/$host/theme/static/$1 + {{state_dir}}/collectstatic/$1 + =404; } location /static { alias {{state_dir}}/collectstatic/; }