IPv6 listening (RFC 6540)

Ensure that Nginx listens also additionally on the IPv6 socket if the
operating system inside the container provides IPv6 support. And as per
RFC 6540, IP nowadays means IPv4 and IPv6, not just IPv4-only.
pull/559/head
Robert Scheck 2020-11-18 19:36:20 +01:00
parent 9b05739ea6
commit 3d0ab7c92e
1 changed files with 7 additions and 0 deletions

View File

@ -250,6 +250,13 @@ fi
sed -e '/{ssl_config}/{r default_nginx_conf/global/ssl_config.conf' -e 'd}' -i /etc/nginx/conf.d/*
sed -e '/{proxy_config}/{r default_nginx_conf/global/proxy_config.conf' -e 'd}' -i /etc/nginx/conf.d/*
sed -i "s/{domain_name}/${DOMAIN_OR_PUBLIC_IP}/g" /etc/nginx/conf.d/*
# IPv6 listening (RFC 6540)
if [ -f /proc/net/if_inet6 ]; then
sed -i 's/ {http_port}/ [::]:{http_port}/g' /etc/nginx/conf.d/*
sed -i 's/ {https_port}/ [::]:{https_port}/g' /etc/nginx/conf.d/*
fi
sed -i "s/{http_port}/${PROXY_HTTP_PORT}/g" /etc/nginx/conf.d/*
sed -i "s/{https_port}/${PROXY_HTTPS_PORT}/g" /etc/nginx/conf.d/*