mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #669] Resolver directive not working? #564
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#564
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rlogiacco on GitHub (Oct 20, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/669
Checklist
What is troubling you?
I'm using proxy manager to proxy docker containers but when a container is restarted the proxy manager reports a 502 BAD GATEWAY.

I tried adding the
resolverdirective in the advanced configuration, likeresolver 127.0.0.11 ipv6=off valid=30s;but it doesn't seem to work:Do I need to use a variable for the resolve to work properly?
@Elmardus commented on GitHub (Oct 21, 2020):
This may be related to the issue #633
@rlogiacco commented on GitHub (Oct 27, 2020):
I managed to have it working and it also solves #633 : you must use a variable and the resolver directive. The variable prevents the DNS resolution at boot from nginx, the resolver determines how frequently such variable is checked against the internal docket DNS.
@Wadera commented on GitHub (Oct 27, 2020):
I would suggest to show full resolution (for any other people who may face similar problem) and close Issue then ;)
@Elmardus commented on GitHub (Mar 3, 2021):
@rlogiacco How did you use the variable and the resolver directive?
I found this guide, but I have not figured out how to implement this in Nginx Proxy Manager.
@chaptergy commented on GitHub (May 12, 2021):
I'm pretty sure he means like this:
The
$custom_upstreamis the variable which will prevent DNS resolution at startup.Which you can paste into your advanced tab.
@kabadisha commented on GitHub (Mar 11, 2023):
For anyone who finds this in future:
This is a valid workaround for the problem where Nginx Proxy Manager fails to start if it can't resolve one of the upstream servers (e.g. another docker container on your unRaid server that is not currently started).
This issue only occurs with Proxy Hosts in NPM that have custom locations defined. The workaround is to remove the custom location declaration in the GUI and instead declare it manually in the 'Advanced' tab of the host like so:
Just replace
example.comwith the host that is not always available.Note: I found that I found that I didn't have to set the resolver. I assume that Nginx is just using whatever its default values are.