NginxProxyManager / NginxProxyManager/nginx-proxy-manager

setup nginx not to crash if host in proxy pass not found

Open
#1,807 15 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
34.2k
Forks
3.9k
Avg merge
21h 12m
Merged PRs (30d)
20

Description

Is your feature request related to a problem? Please describe.
When the proxy_host is used to proxy a docker container and this container is shut down afterwards, if you restart nginx-proxy-manager, it generates an error because the domain no longer exists. Nginx-proxy-manager can no longer launch.

Describe the solution you'd like
Modify the proxy pass option in nginx
actual :
proxy_pass http://:/;
proposal :

No stop when error on config

https://stackoverflow.com/questions/32845674/setup-nginx-not-to-crash-if-host-in-upstream-is-not-found/32846603#32846603

https://stackoverflow.com/questions/35744650/docker-network-nginx-resolver/37656784#37656784

resolver 127.0.0.11 valid=30s ipv6=off;
set $upstream_pass http://:/;
proxy_pass $upstream_pass;

Describe alternatives you've considered
Easier access to proxy_host configuration when nginx-proxy-manager is off to remove non-working configuration

Additional context
error when nginx-proxy-manager is restarted :
host not found in upstream "bar:3000" in /data/nginx/proxy_host/1.conf

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the code or template that generates /data/nginx/proxy_host/1.conf and inspect how proxy_pass is assembled. Reproduce a restart with an unavailable Docker hostname such as bar:3000, then verify that nginx starts and that a later-resolved container still proxies correctly. Done means an unavailable proxy host no longer prevents nginx-proxy-manager from launching.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, nginx
Domain
infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.