root@hack3rs:/srv/www$ curl -i /502/
HTTP/1.1 502 Bad Gateway
A proxy or gateway got an invalid response from the upstream service.
status-summary.log
HTTP 502 Bad Gateway
The edge layer — CDN, reverse proxy, or load balancer — reached the backend but could not get a usable HTTP response.
Trace the request path hop by hop. The problem is almost always at the first upstream that stopped responding or returned garbage.
likely-causes.lst
- $Upstream service crashed, restarted, or returned malformed HTTP.
- $TLS handshake failure between the proxy and origin.
- $DNS resolution or service discovery failure for the upstream address.
- $Load balancer health checks failing intermittently, sending traffic to a dead backend.
recovery-steps.md
- Check reverse proxy and CDN error logs for the upstream response or connection error.
- Confirm the origin service is running and listening on the expected port.
- Validate upstream TLS certificates and the proxy's trust store.
- Review DNS records and service discovery registration for the backend target.
quick-actions.sh
ops-note.txt
Use these pages for debugging and user guidance. In production, configure your host or reverse proxy to return the matching HTTP status code for the route (especially for 502 and 404/500 responses) rather than serving a 200 with error-themed content.