From ac33f8bf7da10c0d9f98190003413610b53689e4 Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Sat, 10 Jan 2026 10:48:29 -0500 Subject: [PATCH] Optional IPv6 in nginx confs --- roles/proxy/templates/server-nginx.conf.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/proxy/templates/server-nginx.conf.j2 b/roles/proxy/templates/server-nginx.conf.j2 index e89bd3f..7485e72 100644 --- a/roles/proxy/templates/server-nginx.conf.j2 +++ b/roles/proxy/templates/server-nginx.conf.j2 @@ -1,13 +1,17 @@ server { listen 80; +{% if proxy.ipv6 is defined and proxy.ipv6 %} listen [::]:80; +{% endif %} server_name {{ item.domain }}; return 301 https://{{ item.domain }}$request_uri; } server { listen 443 ssl http2; +{% if proxy.ipv6 is defined and proxy.ipv6 %} listen [::]:443 ssl http2; +{% endif %} server_name {{ item.domain }}; access_log /var/log/nginx/{{ item.domain }}.log main; {% if proxy.production is defined and proxy.production and proxy.dns_cloudflare.wildcard_domains is defined and item.tls.cert is not defined %}