November 20, 2023 01:31AM
just a question... is there some sort of internal nginx DNS cache? I have a strange problem here...

basic scenario: i have multiple domains (like vhost 1) with different domains (, etc., just example names). But all of them proxy_pass to the same intermediate vhost (vhost 2), which then sends the requests to the backends. A resolver.conf is used, using the providers DNS servers.

all configs a bit simplified...
vhost 1:
server {
listen ssl;
server_name; # or etc.
location / {
proxy_set_header; # some other domains running on, so set the header here

vhost 2:
server {
listen ssl;
location / {
proxy_pass http://my-backends; # my-backends is an upstreamreferring to 2 identical backends

When i change the IP address of in the providers DNS to e.g. and create a vhost 3 (identical to vhost 2, but with this new IP address) on a different server (all the vhosts like vhost 1 remain unchanged), the operating system soon receives the changes (checked with ping, dig etc.) - but nginx somehow still uses the old IP ( instead of address, even after days (DNS ttl: 60s). nginx restart doesn't help.

Hope you were able to follow this long text... but is there some sort of nginx-internal DNS cache? DNS changes work (tested external and on the debian server), but only nginx doesn't seem to care and still uses an old IP.

Subject Author Posted

nginx DNS cache?

revirii November 20, 2023 01:31AM

Re: nginx DNS cache?

revirii November 27, 2023 01:13AM

Re: nginx DNS cache?

revirii January 11, 2024 02:16AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 182
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready