Optional IPv6 in nginx confs
This commit is contained in:
@@ -1,13 +1,17 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
{% if proxy.ipv6 is defined and proxy.ipv6 %}
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
{% endif %}
|
||||||
server_name {{ item.domain }};
|
server_name {{ item.domain }};
|
||||||
return 301 https://{{ item.domain }}$request_uri;
|
return 301 https://{{ item.domain }}$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
|
{% if proxy.ipv6 is defined and proxy.ipv6 %}
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl http2;
|
||||||
|
{% endif %}
|
||||||
server_name {{ item.domain }};
|
server_name {{ item.domain }};
|
||||||
access_log /var/log/nginx/{{ item.domain }}.log main;
|
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 %}
|
{% if proxy.production is defined and proxy.production and proxy.dns_cloudflare.wildcard_domains is defined and item.tls.cert is not defined %}
|
||||||
|
|||||||
Reference in New Issue
Block a user