Topic cluster

Troubleshooting proxies

Read 502, 503 and 504 correctly, drive curl through a proxy, understand no_proxy, survive a corporate proxy, and bisect a chain methodically.

6 guides · cluster reviewed 8 September 2026

Most proxy debugging goes wrong in the first minute, because the investigation starts at the layer that reported the error rather than the layer that caused it. A proxy reports what it experienced, which is usually a symptom of something one hop further in.

The method that works is always the same: draw the chain, bisect it, and find the innermost hop that still shows the fault. A proxy debugging playbook is the long form of that method, and everything else in this cluster is a specific case of it.

By symptom#

SymptomStart here
502, 503 or 504502 vs 503 vs 504
Intermittent 502 under loadKeep-alive and upstream connection pooling
504 with no upstream log lineTimeout budgets
upstream sent too big headerHeader and body size limits
Wrong client IP in the logsConfiguring trusted proxies
Infinite redirect loop over HTTPSX-Real-IP, X-Forwarded-Proto, Host and Port
404 only for one path prefixnginx proxy_pass and the trailing slash
Some tools bypass the proxy, others do notThe no_proxy environment variable
unable to get local issuer certificateTLS interception and corporate root CAs
npm, pip, git or docker failing at workCorporate proxies and developer tooling

The one tool to learn properly#

curl through a proxy is worth reading even if you already use curl daily. The --write-out timing breakdown alone will localise most latency problems to a single hop in one command.

Every guide in this cluster#