NginxProxyManager / NginxProxyManager/nginx-proxy-manager
Failed nginx config reload (bad upstream in one location) silently disables entire proxy host with no UI error
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 34.2k
- Forks
- 3.9k
- Avg merge
- 21h 12m
- Merged PRs (30d)
- 20
Description
Description:
When a Proxy Host has multiple custom locations, and even one of them points to an unresolvable upstream (e.g. a stopped/renamed docker container), nginx's config test fails for the whole generated file — which is expected, since nginx validates the file as a unit. The problem is what happens next:
- The UI shows a generic "saved" success toast, with no indication anything went wrong.
- The failed nginx reload is logged, but only into the
meta.nginx_errJSON field in the SQLiteproxy_hosttable — it never surfaces in the UI, and it does not appear indocker logsin an obviously flagged way. - Because the reload failed, NPM never writes/updates the actual conf file in
/data/nginx/proxy_host/. This means the entire host — including all its other, perfectly healthy locations — silently stops resolving, with clients seeing a raw TLSunrecognized namealert (from NPM's defaultssl_reject_handshakecatch-all) rather than any indication of what broke.
Steps to reproduce:
- Create a Proxy Host with 2+ custom
locations, each pointing to a different upstream. - Make one location's
forward_hostpoint to a docker hostname that isn't currently resolvable (container stopped, renamed, or not on the same network). - Save the host. UI shows "saved" with no warning.
- Observe:
/data/nginx/proxy_host/<id>.confis not created/updated, and all locations on that host — including the working ones — fail with a TLS SNI rejection, not just the broken location. - The actual error (
nginx: [emerg] host not found in upstream "...") is only discoverable by querying the SQLiteproxy_host.metacolumn directly
Expected behavior:
- The UI should surface the nginx config test failure at save time (e.g. a toast/banner with the actual
nginx -terror), instead of reporting success. - Ideally, a single bad
locationupstream shouldn't be able to take down the whole host — though I guess this may be inherent to how nginx validates config files as a unit
Environment:
jc21/nginx-proxy-manager:latest(docker)- config generation to
/data/nginx/proxy_host/
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with multiple custom locations and inspect the generated file path under /data/nginx/proxy_host/, the SQLite proxy_host.meta field, and the save/reload flow. Start with the nginx -t error and trace how it is recorded and returned to the UI. Done means a failed reload is visibly reported at save time with the actual configuration error instead of a success message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx, typescript
- Domain
- backend, devops, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100