fix: Nginx Docker DNS IPv6 SERVFAIL

Docker's internal DNS server often returns SERVFAIL for IPv6 (AAAA)
queries if IPv6 is disabled on the network. When Nginx encounters a
SERVFAIL for IPv6, it considers the whole resolution failed and throws
a 502 Bad Gateway. Added ipv6=off to the resolver directive.
This commit is contained in:
vithobaa 2026-06-29 18:48:57 +05:30
parent 9b4fe6677c
commit b16c7c4a35
1 changed files with 2 additions and 2 deletions

View File

@ -5,8 +5,8 @@ server {
# Allow large request bodies (screenshots are base64 encoded)
client_max_body_size 50M;
# Use Docker's internal DNS resolver resolves upstream at request time, not startup
resolver 127.0.0.11 valid=30s;
# Use Docker's internal DNS resolver (disable IPv6 to prevent SERVFAIL)
resolver 127.0.0.11 ipv6=off valid=30s;
set $backend http://master:9090;
# Serve static files from the React build