resolver does not work

mailinglist at mailinglist at
Tue Apr 18 12:58:08 UTC 2023

I have a nginx proxy in front of systemd-nspawn containers.
The IP's of the containers are dynamic.

When I start nginx *after* the  containers it works.
When the IP of the container is changed while nginx is running i get a 
"Bad Gateway" error.

The config looks like:

server {
    location / {
       resolver valid=10s;
       proxy_pass http://container;

nginx is 1.1.18 so it should work as documented in
The workaround there 
doesn't work.

I have also try to config a upstream backend and the resolver in the 
server part or in the http part.
The errors are: "upstream timed out" or "container could not be resolved 
(3: Host not found)"

Whats wrong there?
Best Regards

More information about the nginx mailing list