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

Merge pull request #713 from schrieveslaach/master

Add IPv6 listen address
This commit is contained in:
Jason Wilder 2017-02-13 09:25:33 -07:00 committed by GitHub
commit c0f60087c3

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;