From 2fde003525e080ae9d8ae3251483fcbfe07dc4f0 Mon Sep 17 00:00:00 2001 From: jwklijnsma Date: Tue, 27 Feb 2024 11:44:49 +0100 Subject: [PATCH] fix --- backend/templates/_listen.conf | 43 ++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/backend/templates/_listen.conf b/backend/templates/_listen.conf index 9081f240..1817912d 100644 --- a/backend/templates/_listen.conf +++ b/backend/templates/_listen.conf @@ -1,24 +1,27 @@ -{% if enable_proxy_protocol == 1 or enable_proxy_protocol == true%} +{% if enable_proxy_protocol == 1 or enable_proxy_protocol == true %} listen 88 proxy_protocol; -{% if ipv6 -%} - listen [::]:88 proxy_protocol; -{% endif %} -{% else -%} + {% if ipv6 -%} + listen [::]:88 proxy_protocol; + {% endif %} +{% else %} listen 80; -{% if ipv6 -%} - listen [::]:80; -{% endif %} + {% if ipv6 -%} + listen [::]:80; + {% endif %} {% endif %} -{% if certificate -%} -{% if enable_proxy_protocol == 1 or enable_proxy_protocol == true%} - listen 444 ssl{% if http2_support %} http2{% endif %} proxy_protocol; -{% if ipv6 -%} - listen [::]:444 ssl{% if http2_support %} http2{% endif %} proxy_protocol; + +{% if certificate %} + {% if enable_proxy_protocol == 1 or enable_proxy_protocol == true %} + listen 444 ssl{% if http2_support %} http2{% endif %} proxy_protocol; + {% if ipv6 -%} + listen [::]:444 ssl{% if http2_support %} http2{% endif %} proxy_protocol; + {% endif %} + {% else %} + listen 443 ssl{% if http2_support %} http2{% endif %}; + {% if ipv6 -%} + listen [::]:443 ssl{% if http2_support %} http2{% endif %}; + {% endif %} + {% endif %} {% endif %} -{% else -%} - listen 443 ssl{% if http2_support %} http2{% endif %}; -{% if ipv6 -%} - listen [::]:443 ssl{% if http2_support %} http2{% endif %}; -{% endif %} -{% endif %} - server_name {{ domain_names | join: " " }}; \ No newline at end of file + +server_name {{ domain_names | join: " " }}; \ No newline at end of file