mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #3961] Nginx Proxy Manager "502 Bad Gateway- openresty" #2591
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#2591
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 @MouadR01 on GitHub (Aug 27, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3961
I've recently set up NPM for some servers on my backend and everything seems to be working just fine for most except for a couple servers that seem to return a "502 Bad Gateway" errors even when I'm sure the scheme is correct and and the port is active.
When I try to execute a curl command from within my docker container, it works just fine and the server responds.
Here's the error I managed to get from the error log: "[error] 667#667: *1150 SSL_do_handshake() failed (SSL: error:0A00042E:SSL routines::tlsv1 alert protocol version:SSL alert number 70) while SSL handshaking to upstream,"
Any ideas how to fix this? I've hit a dead end. Thank you.
I tried to change the resolution from an IP Address one to an FQDN one by modifying the "hosts" file on my reverse proxy server since I noticed that when using the IP Address, my server returns a "404 Not Found" error.
What I tried to do so far is try a handshake using the two versions of TLS (v1.2 and v1.3) and what I've noticed compared to the other servers, the server I'm having an issue with only accepts a TLSv1.3 handshake. Taking this a step further, I added a line within my NPM config to specify the usage of TLSv1.3 "ssl_protocols TLSv1.3;" yet it didn't work.
@zaigham commented on GitHub (Aug 27, 2024):
Are you using multiple domains in a single proxy config? eg.
domain.com www.domain.comIf so, try adding this into advanced nginx config:
@hilalkukm commented on GitHub (Feb 24, 2025):
i have same problem, my setup is :
When i try to add proxy list to NPM and specify port 9001 inside Forward Port and Forward Hostname / IP, i fill container name, the result is 502 Bad Gateway. Then i check inside nginx proxy manager log "/data/log/proxy-host-1_error.log" appear error below :
2025/02/24 04:57:00 [error] 476#476: *591 connect() failed (111: Connection refused) while connecting to upstream, client: 172.x.x.x, server: test1.example.com, request: "GET / HTTP/2.0", upstream: "http://172.18.0.5:9001/", host: "test1.example.com", referrer: "http://x.x.x.x:81/"From above error, i analyze if the docker gateway won't redirect to container exposed port, then i change Forward Port with port 80, and finally it works.
@github-actions[bot] commented on GitHub (Dec 19, 2025):
Issue is now considered stale. If you want to keep it open, please comment 👍