Skip to content

Commit 5593005

Browse files
committed
reverse-proxy-nginx: disable dns cache for upstream
That they are resolved each time. Helps when you have to recreate upstreams. Then you don't have to also recreate the reverse-proxy. See https://nginx.org/en/docs/http/ngx_http_core_module.html#resolver I also tried using variables, but I failed to rewrite the api url when using variables. https://wisdom.gitbook.io/gyan/nginx/deep-dive-into-nginx-variables
1 parent 994f92f commit 5593005

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reverse-proxy-nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ http {
1111
'' close;
1212
}
1313

14-
resolver 127.0.0.11;
14+
resolver 127.0.0.11 valid=0s;
1515
include /etc/nginx/mime.types;
1616
default_type application/octet-stream;
1717
log_format main '$remote_addr - $remote_user [$time_local] "$request" '

0 commit comments

Comments
 (0)