diff options
Diffstat (limited to 'roles/nginx/vhost/templates/tls-with-redirect.conf.j2')
-rw-r--r-- | roles/nginx/vhost/templates/tls-with-redirect.conf.j2 | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/roles/nginx/vhost/templates/tls-with-redirect.conf.j2 b/roles/nginx/vhost/templates/tls-with-redirect.conf.j2 index cdf267ab..d131fe2a 100644 --- a/roles/nginx/vhost/templates/tls-with-redirect.conf.j2 +++ b/roles/nginx/vhost/templates/tls-with-redirect.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 'tls' in nginx_vhost %} {% if nginx_vhost.tls.certificate_provider == 'acmetool' or nginx_vhost.tls.certificate_provider == 'uacme' %} include snippets/{{ nginx_vhost.tls.certificate_provider }}.conf; @@ -29,15 +23,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 %} |