Merge pull request #148 from ekimekim/mike/nginx/prevent-dns-caching

nginx: Prevent nginx from caching dns results
pull/150/head
Mike Lang 5 years ago committed by GitHub
commit 6f0eff0258
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,7 +9,8 @@
generate_location() {
# generate_location PATH URL
echo -e "\t\tlocation $1 { proxy_pass $2; }"
# We indirect via a variable to prevent nginx from caching dns forever
echo -e "\t\tlocation $1 { set \$name \"$2\"; proxy_pass \$name; }"
}
LOCATIONS=$(
@ -37,6 +38,7 @@ events {
http {
include /etc/nginx/mime.types;
resolver 127.0.0.11 valid=10s;
server {
listen 80;
gzip on;

Loading…
Cancel
Save