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:
parent
b9e2053c38
commit
8b67b2182f
@ -74,6 +74,7 @@ proxy_set_header Proxy "";
|
|||||||
server {
|
server {
|
||||||
server_name _; # This is just an invalid value which will never trigger on a real hostname.
|
server_name _; # This is just an invalid value which will never trigger on a real hostname.
|
||||||
listen 80;
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
access_log /var/log/nginx/access.log vhost;
|
access_log /var/log/nginx/access.log vhost;
|
||||||
return 503;
|
return 503;
|
||||||
}
|
}
|
||||||
@ -82,6 +83,7 @@ server {
|
|||||||
server {
|
server {
|
||||||
server_name _; # This is just an invalid value which will never trigger on a real hostname.
|
server_name _; # This is just an invalid value which will never trigger on a real hostname.
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
|
listen [::]:443 ssl http2;
|
||||||
access_log /var/log/nginx/access.log vhost;
|
access_log /var/log/nginx/access.log vhost;
|
||||||
return 503;
|
return 503;
|
||||||
|
|
||||||
@ -149,6 +151,7 @@ upstream {{ $upstream_name }} {
|
|||||||
server {
|
server {
|
||||||
server_name {{ $host }};
|
server_name {{ $host }};
|
||||||
listen 80 {{ $default_server }};
|
listen 80 {{ $default_server }};
|
||||||
|
listen [::]:80 {{ $default_server }};
|
||||||
access_log /var/log/nginx/access.log vhost;
|
access_log /var/log/nginx/access.log vhost;
|
||||||
return 301 https://$host$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
@ -157,6 +160,7 @@ server {
|
|||||||
server {
|
server {
|
||||||
server_name {{ $host }};
|
server_name {{ $host }};
|
||||||
listen 443 ssl http2 {{ $default_server }};
|
listen 443 ssl http2 {{ $default_server }};
|
||||||
|
listen [::]:443 ssl http2 {{ $default_server }};
|
||||||
access_log /var/log/nginx/access.log vhost;
|
access_log /var/log/nginx/access.log vhost;
|
||||||
|
|
||||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||||
@ -210,6 +214,7 @@ server {
|
|||||||
server {
|
server {
|
||||||
server_name {{ $host }};
|
server_name {{ $host }};
|
||||||
listen 80 {{ $default_server }};
|
listen 80 {{ $default_server }};
|
||||||
|
listen [::]:80 {{ $default_server }};
|
||||||
access_log /var/log/nginx/access.log vhost;
|
access_log /var/log/nginx/access.log vhost;
|
||||||
|
|
||||||
{{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }}
|
{{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }}
|
||||||
@ -241,6 +246,7 @@ server {
|
|||||||
server {
|
server {
|
||||||
server_name {{ $host }};
|
server_name {{ $host }};
|
||||||
listen 443 ssl http2 {{ $default_server }};
|
listen 443 ssl http2 {{ $default_server }};
|
||||||
|
listen [::]:443 ssl http2 {{ $default_server }};
|
||||||
access_log /var/log/nginx/access.log vhost;
|
access_log /var/log/nginx/access.log vhost;
|
||||||
return 500;
|
return 500;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user