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

Incompatibility between nginx/openresty version and generated .conf

Open afranks opened this issue 11 months ago • 4 comments

https://github.com/NginxProxyManager/nginx-proxy-manager/pull/4106 changed the way that the http2 directive is declared in .conf files to eliminate warnings related to that directive. If NPM is upgraded and openresty/nginx are not and are on a version that predates the move of the http2 directive, this can cause newly created hosts to fail to start (they're perpetually stuck in the offline state) due to a failed .conf validation. Old hosts work fine unless you save them (I assume this causes the .conf file to be regenerated).

This might only be an issue where NPM was created and upgraded through Proxmox VE helper scripts (https://community-scripts.github.io/ProxmoxVE/) in which case this isn't really a bug with NPM. Even if that's the case there may be an opportunity to log a warning about the openresty version incompatibility.

I suspect this might also contribute to some of the reports on this/similar thread since I encountered a very similar error prior to upgrading openresty: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3497

Either way, not looking for support here just wanted to call this out in case it is also an issue with docker deployed NPM that are upgraded or in case there's an easy way to make clear to users that they are using an old + incompatible version of openresty.

afranks avatar Jan 25 '25 17:01 afranks

bumping this one since I spent lots of hours debugging this.

I saved an existing config and stoped working, had to rollback to a backup to get it working.

Creating a new config also failed and gave issues. The config stays offline and never creates the nginx config. I had to manually create it to get what I was testing working.

NPM 2.12.2

openresty -v
nginx version: openresty/1.21.4.3

Manually upgrading to 1.27.1.1 caused npm to not even start. Not sure what the correct version combination is

naxhh avatar Feb 02 '25 14:02 naxhh

FWIW I do think that I was on a version around 1.21 when I was encountered this issue, so it's very possible your initial problem was the same (though unsure why it'd continue to fail after upgrade). https://www.f5.com/company/blog/nginx/nginx-plus-r30-released seems to support the idea that the change to add support for the new http2 directive happened in 1.25.1 (I think openresty <-> nginx version numbers are in sync).

afranks avatar Feb 02 '25 16:02 afranks

Got the same problem, and your post fixed it for me, updated openresty to 1.27.1.2 and started to work again.

https://blog.openresty.com/en/ubuntu20-or-install/

Nightraider89 avatar Apr 24 '25 21:04 Nightraider89

Issue is now considered stale. If you want to keep it open, please comment :+1:

github-actions[bot] avatar Nov 17 '25 02:11 github-actions[bot]