summaryrefslogtreecommitdiff
path: root/roles/nginx/vhost/templates/static-files-with-acme.conf.j2
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-04-03 19:47:09 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-04-03 19:47:09 +0200
commit62caab726fa8dab32470f796804c993f2cc9e166 (patch)
treeeccf7d1ff19a82c011c4cd34f8d52c839cbe0701 /roles/nginx/vhost/templates/static-files-with-acme.conf.j2
parentnginx/vhost make static file templatemore generic (diff)
root vs alias for nginx static file vhost
Diffstat (limited to 'roles/nginx/vhost/templates/static-files-with-acme.conf.j2')
-rw-r--r--roles/nginx/vhost/templates/static-files-with-acme.conf.j24
1 files changed, 4 insertions, 0 deletions
diff --git a/roles/nginx/vhost/templates/static-files-with-acme.conf.j2 b/roles/nginx/vhost/templates/static-files-with-acme.conf.j2
index 09f22544..cf1f511a 100644
--- a/roles/nginx/vhost/templates/static-files-with-acme.conf.j2
+++ b/roles/nginx/vhost/templates/static-files-with-acme.conf.j2
@@ -27,7 +27,11 @@ server {
{% endif %}
{% for path, location in nginx_vhost.locations.items() %}
location {{ path }} {
+{% if 'root' in location %}
root {{ location.root }};
+{% elif 'alias' in location %}
+ alias {{ location.alias }};
+{% endif %}
{% if 'index' in location %}
index {{ location.index }};
{% endif %}