set nginx DNS configuration from container resolv.conf to allow proxy to operate behind firewall

This commit is contained in:
Stan Yagolnitser
2018-12-12 00:18:34 -08:00
parent 97e77ccc56
commit a89cf362ad
2 changed files with 14 additions and 3 deletions

View File

@@ -108,7 +108,8 @@ http {
proxy_max_temp_file_size 0;
# We need to resolve the real names of our proxied servers.
resolver 8.8.8.8 4.2.2.2 ipv6=off; # Avoid ipv6 addresses for now
#resolver 8.8.8.8 4.2.2.2 ipv6=off; # Avoid ipv6 addresses for now
include /etc/nginx/resolvers.conf;
# forward proxy for non-CONNECT request
location / {
@@ -140,7 +141,8 @@ http {
ssl_certificate_key /certs/web.key;
# We need to resolve the real names of our proxied servers.
resolver 8.8.8.8 4.2.2.2 ipv6=off; # Avoid ipv6 addresses for now
#resolver 8.8.8.8 4.2.2.2 ipv6=off; # Avoid ipv6 addresses for now
include /etc/nginx/resolvers.conf;
# Docker needs this. Don't ask.
chunked_transfer_encoding on;
@@ -238,4 +240,4 @@ http {
}
}
}
}