Also check notls variable state
This commit is contained in:
parent
b247b39785
commit
41f04835de
@ -24,7 +24,7 @@ server {
|
||||
{% endif %}
|
||||
server_name {{ domains | join(' ') }};
|
||||
|
||||
{%+ if notls is not defined and unsecure_server is not defined %}
|
||||
{%+ if (notls is not defined or not notls) and unsecure_server is not defined %}
|
||||
location / {
|
||||
# enforce https
|
||||
return 301 https://$server_name:443$request_uri;
|
||||
@ -40,7 +40,7 @@ server {
|
||||
{% endif %}
|
||||
}
|
||||
}
|
||||
{%+ if notls is not defined %}
|
||||
{%+ if notls is not defined or not notls %}
|
||||
server {
|
||||
{% if nginx_listen443 is defined %}
|
||||
{{ nginx_listen443 }}
|
||||
@ -81,6 +81,7 @@ ssl_certificate /etc/ssl/csr/{{ domains[0] }}-fullchain.crt;
|
||||
{% if server -%}
|
||||
{{ server | indent(4) }}
|
||||
{%- endif %}
|
||||
|
||||
{% if server2 is defined -%}
|
||||
{{ server2 | indent(4) }}
|
||||
{%- endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user