Troubleshooting guide
Nginx Proxy Manager 502: Check the Upstream Before the Certificate
Category: Reverse Proxy & SSL
nginx proxy manager 502.
A 502 from Nginx Proxy Manager means the request reached the proxy but the upstream answer was missing or invalid. Test that path before changing TLS.
Before you start
- The proxy hostname and upstream IP/port
- Access to Nginx Proxy Manager logs
- A client browser and a terminal on the proxy network
- Permission to restart one service if needed
Step-by-step checks
Step 1: Read the proxy error
Open the proxy host's logs and record the upstream address, port, and exact error. A connection refused, timeout, and DNS failure point to different layers.
Check: The log names the upstream and failure type.
Step 2: Request the upstream directly
From the proxy host, use curl or a browser to request the internal service address. Test the same scheme and path the proxy uses.
Check: The upstream returns the expected HTTP response without the proxy.
Step 3: Match the proxy host settings
Compare forward hostname/IP, port, scheme, and websocket settings with the service. Correct one field at a time and save the host.
Check: The proxy host points to the service that answered the direct test.
Step 4: Check DNS and certificate separately
Resolve the public hostname, confirm it reaches the proxy, then inspect the certificate's subject, SANs, and dates. Do not reissue a certificate to fix a 502.
Check: DNS points to the proxy and the certificate matches the hostname.
Step 5: Verify HTTPS from a client
Open the hostname in a clean browser, confirm the certificate chain, and load a known page. Repeat after a proxy reload.
Check: The intended app loads over HTTPS without a certificate warning.
Verify the result
The public hostname reaches the intended upstream, the certificate is trusted for that name, and a second browser profile gets the same result.
Rollback
Keep the previous proxy-host values and certificate reference. Restore them if a change makes the host unreachable.
Ask for help with this exact symptom · All troubleshooting guides