File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 3
3
set -Eeuo pipefail
4
4
trap " echo TRAPed signal" HUP INT QUIT TERM
5
5
6
+ # configure nginx DNS settings to match host, why must we do that nginx?
7
+ conf=" resolver $( /usr/bin/awk ' BEGIN{ORS=" "} $1=="nameserver" {print $2}' /etc/resolv.conf) ipv6=off; # Avoid ipv6 addresses for now"
8
+ [ " $conf " = " resolver ;" ] && echo " no nameservers found" && exit 0
9
+ confpath=/etc/nginx/resolvers.conf
10
+ if [ ! -e $confpath ] || [ " $conf " != " $( cat $confpath ) " ]
11
+ then
12
+ echo " $conf " > $confpath
13
+ fi
14
+
6
15
# The list of SAN (Subject Alternative Names) for which we will create a TLS certificate.
7
16
ALLDOMAINS=" "
8
17
Original file line number Diff line number Diff line change @@ -108,7 +108,8 @@ http {
108
108
proxy_max_temp_file_size 0 ;
109
109
110
110
# We need to resolve the real names of our proxied servers.
111
- resolver 8.8.8.8 4.2.2.2 ipv6=off; # Avoid ipv6 addresses for now
111
+ #resolver 8.8.8.8 4.2.2.2 ipv6=off; # Avoid ipv6 addresses for now
112
+ include /etc/nginx/resolvers.conf;
112
113
113
114
# forward proxy for non-CONNECT request
114
115
location / {
@@ -140,7 +141,8 @@ http {
140
141
ssl_certificate_key /certs/web.key;
141
142
142
143
# We need to resolve the real names of our proxied servers.
143
- resolver 8.8.8.8 4.2.2.2 ipv6=off; # Avoid ipv6 addresses for now
144
+ #resolver 8.8.8.8 4.2.2.2 ipv6=off; # Avoid ipv6 addresses for now
145
+ include /etc/nginx/resolvers.conf;
144
146
145
147
# Docker needs this. Don't ask.
146
148
chunked_transfer_encoding on ;
@@ -238,4 +240,4 @@ http {
238
240
}
239
241
240
242
}
241
- }
243
+ }
You can’t perform that action at this time.
0 commit comments