From 8b67b2182fa2e263988098b00793bd5ec1ee6dc4 Mon Sep 17 00:00:00 2001 From: Marc Schreiber Date: Sat, 11 Feb 2017 13:28:34 +0100 Subject: [PATCH] Add IPv6 listen address --- nginx.tmpl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nginx.tmpl b/nginx.tmpl index a6a45e6..2cbd156 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -74,6 +74,7 @@ proxy_set_header Proxy ""; server { server_name _; # This is just an invalid value which will never trigger on a real hostname. listen 80; + listen [::]:80; access_log /var/log/nginx/access.log vhost; return 503; } @@ -82,6 +83,7 @@ server { server { server_name _; # This is just an invalid value which will never trigger on a real hostname. listen 443 ssl http2; + listen [::]:443 ssl http2; access_log /var/log/nginx/access.log vhost; return 503; @@ -149,6 +151,7 @@ upstream {{ $upstream_name }} { server { server_name {{ $host }}; listen 80 {{ $default_server }}; + listen [::]:80 {{ $default_server }}; access_log /var/log/nginx/access.log vhost; return 301 https://$host$request_uri; } @@ -157,6 +160,7 @@ server { server { server_name {{ $host }}; listen 443 ssl http2 {{ $default_server }}; + listen [::]:443 ssl http2 {{ $default_server }}; access_log /var/log/nginx/access.log vhost; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; @@ -210,6 +214,7 @@ server { server { server_name {{ $host }}; listen 80 {{ $default_server }}; + listen [::]:80 {{ $default_server }}; access_log /var/log/nginx/access.log vhost; {{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }} @@ -241,6 +246,7 @@ server { server { server_name {{ $host }}; listen 443 ssl http2 {{ $default_server }}; + listen [::]:443 ssl http2 {{ $default_server }}; access_log /var/log/nginx/access.log vhost; return 500;