diff options
author | Christian Pointner <equinox@spreadspace.org> | 2021-04-03 19:47:09 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2021-04-03 19:47:09 +0200 |
commit | 62caab726fa8dab32470f796804c993f2cc9e166 (patch) | |
tree | eccf7d1ff19a82c011c4cd34f8d52c839cbe0701 /roles/nginx/vhost/templates | |
parent | nginx/vhost make static file templatemore generic (diff) |
root vs alias for nginx static file vhost
Diffstat (limited to 'roles/nginx/vhost/templates')
-rw-r--r-- | roles/nginx/vhost/templates/static-files-with-acme.conf.j2 | 4 |
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 %} |