diff options
author | Christian Pointner <equinox@spreadspace.org> | 2024-04-02 19:00:25 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2024-04-02 19:00:25 +0200 |
commit | 65b5dd6aee7081da61a4c8a525a20452c2a080ac (patch) | |
tree | 083eeb451e749052a270c03c7b6ed60bdd5496b3 /roles/nginx/vhost/templates/tls-only.conf.j2 | |
parent | since ele-companion-raspsi now lives in lan, mixer vlan again needs not internet (diff) |
nginx/vhost: always configure access_logs and error_logs
Diffstat (limited to 'roles/nginx/vhost/templates/tls-only.conf.j2')
-rw-r--r-- | roles/nginx/vhost/templates/tls-only.conf.j2 | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/roles/nginx/vhost/templates/tls-only.conf.j2 b/roles/nginx/vhost/templates/tls-only.conf.j2 index 122e2f4f..05820d96 100644 --- a/roles/nginx/vhost/templates/tls-only.conf.j2 +++ b/roles/nginx/vhost/templates/tls-only.conf.j2 @@ -4,15 +4,9 @@ server { {% endfor %} server_name {{ nginx_vhost.hostnames | default(['_']) | join(' ') }}; -{% if 'logs' in nginx_vhost %} -{% if 'access' in nginx_vhost.logs %} - access_log {{ nginx_vhost.logs.access }}; -{% endif %} -{% if 'error' in nginx_vhost.logs %} - error_log {{ nginx_vhost.logs.error }}; -{% endif %} + access_log {{ nginx_vhost.logs.access | default('/var/log/nginx/' + nginx_vhost.name + '_access.log') }}; + error_log {{ nginx_vhost.logs.error | default('/var/log/nginx/' + nginx_vhost.name + '_error.log') }}; -{% endif %} {% if nginx_vhost.tls.certificate_provider == 'acmetool' or nginx_vhost.tls.certificate_provider == 'uacme' %} include snippets/{{ nginx_vhost.tls.certificate_provider }}.conf; {% endif %} |