1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2024-11-22 11:56:31 +00:00

Add IPv6 listen address

This commit is contained in:
Marc Schreiber 2017-02-11 13:28:34 +01:00
parent b9e2053c38
commit 8b67b2182f

View File

@ -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;