summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/nginx/vhost/templates/generic.conf.j220
1 files changed, 10 insertions, 10 deletions
diff --git a/roles/nginx/vhost/templates/generic.conf.j2 b/roles/nginx/vhost/templates/generic.conf.j2
index f87d029d..356c74dc 100644
--- a/roles/nginx/vhost/templates/generic.conf.j2
+++ b/roles/nginx/vhost/templates/generic.conf.j2
@@ -16,7 +16,7 @@ server {
{% if nginx_vhost.tls.certificate_provider == 'acmetool' %}
include snippets/acmetool.conf;
-{% endif %}
+{% endif %}
location / {
return 301 https://$host$request_uri;
}
@@ -27,24 +27,24 @@ server {
listen [::]:443 ssl http2{% if 'default' in nginx_vhost and nginx_vhost.default %} default_server{% endif %};
server_name {{ nginx_vhost.hostnames | join(' ') }};
-{% if 'logs' in nginx_vhost %}
-{% if 'access' in nginx_vhost.logs %}
+{% if 'logs' in nginx_vhost %}
+{% if 'access' in nginx_vhost.logs %}
access_log {{ nginx_vhost.logs.access }};
-{% endif %}
-{% if 'error' in nginx_vhost.logs %}
+{% endif %}
+{% if 'error' in nginx_vhost.logs %}
error_log {{ nginx_vhost.logs.error }};
-{% endif %}
+{% endif %}
-{% endif %}
+{% endif %}
{% if nginx_vhost.tls.certificate_provider == 'acmetool' %}
include snippets/acmetool.conf;
-{% endif %}
+{% endif %}
include snippets/tls{% if 'variant' in nginx_vhost.tls %}-{{ nginx_vhost.tls.variant }}{% endif %}.conf;
ssl_certificate {{ x509_certificate_path_fullchain }};
ssl_certificate_key {{ x509_certificate_path_key }};
-{% if 'hsts' not in nginx_vhost.tls or nginx_vhost.tls.hsts %}
+{% if 'hsts' not in nginx_vhost.tls or nginx_vhost.tls.hsts %}
include snippets/hsts.conf;
-{% endif %}
+{% endif %}
{% endif %}
{% if 'extra_directives' in nginx_vhost %}