set nginx DNS configuration from container resolv.conf to allow proxy to operate behind firewall
This commit is contained in:
@@ -3,6 +3,15 @@
|
||||
set -Eeuo pipefail
|
||||
trap "echo TRAPed signal" HUP INT QUIT TERM
|
||||
|
||||
#configure nginx DNS settings to match host, why must we do that nginx?
|
||||
conf="resolver $(/usr/bin/awk 'BEGIN{ORS=" "} $1=="nameserver" {print $2}' /etc/resolv.conf) ipv6=off; # Avoid ipv6 addresses for now"
|
||||
[ "$conf" = "resolver ;" ] && echo "no nameservers found" && exit 0
|
||||
confpath=/etc/nginx/resolvers.conf
|
||||
if [ ! -e $confpath ] || [ "$conf" != "$(cat $confpath)" ]
|
||||
then
|
||||
echo "$conf" > $confpath
|
||||
fi
|
||||
|
||||
# The list of SAN (Subject Alternative Names) for which we will create a TLS certificate.
|
||||
ALLDOMAINS=""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user