nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

FIX: Ngnix fails to start if upstream host for stream is unavailable/unreachable

Open kabadisha opened this issue 1 year ago • 7 comments

Issue:

Currently, if the upstream host being forwarded to is down, Nginx fails to start. Reported by @StefaBa here: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/2672#issuecomment-1475361687

Impact:

In this scenario:

  • All other hosts managed by NPM are now also taken out.
  • NPM cannot be started in order to disable or edit the host configuration in order to rectify the issue.

Solution:

Declare a variable for forwarding_host instead of simply injecting it directly into the proxy_pass directive. Use variables for proxy_pass directive in order to prevent startup failure if the upstream host is down.

@StefaBa this one is for you. I think it should work, but I don't use this functionality, so can you please test it?

kabadisha avatar Mar 19 '23 20:03 kabadisha