From 4bac1a6aaf0b557e62a50e86f43162f53a51ae5b Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 18 Jul 2019 16:04:20 +0200 Subject: [PATCH] fix linebreaks in vhost template --- templates/etc/nginx/sites-available/vhost.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/etc/nginx/sites-available/vhost.j2 b/templates/etc/nginx/sites-available/vhost.j2 index 574488e..67b288f 100644 --- a/templates/etc/nginx/sites-available/vhost.j2 +++ b/templates/etc/nginx/sites-available/vhost.j2 @@ -21,8 +21,8 @@ server { ssl_dhparam {{ item.value.ssl.dhparam }}; {% endif %} {% endif %} - {% if server.tls_redirect | default(False) %} + return 301 https://{% if server.tls_redirect_url is defined %}{{ server.tls_redirect_url }}{% else %}$server_name{% endif %}$request_uri; {% else %} {% if server.client_max_body_size is defined and server.client_max_body_size %}