Guide and reference
Reverse Proxies
A reverse proxy accepts requests for a service and forwards them to selected origins. It can terminate TLS, balance load, cache responses and enforce access policies. The client may never connect directly to the application server, which changes how source addresses, schemes and request headers must be interpreted.
Reverse Proxies
A reverse proxy accepts requests for a service and forwards them to selected origins. It can terminate TLS, balance load, cache responses and enforce access policies. The client may never connect directly to the application server, which changes how source addresses, schemes and request headers must be interpreted.
ReferenceHow reverse proxies work
Reverse proxies accept client connections and create separate upstream exchanges with origins.
ReferenceNginx reverse proxy
Nginx reverse proxying uses upstream and proxy configuration to forward requests to origins.
ReferenceApache reverse proxy
Apache reverse proxying uses mod_proxy handlers and configured upstream mappings.
ReferenceHAProxy
HAProxy balances transport or application traffic with configurable health checks and routing policy.
ReferenceTraefik
Traefik reverse-proxies requests using configured routers, services and optional dynamic discovery.
ReferenceCaddy
Caddy is a web server and reverse proxy with automatic HTTPS capabilities in supported configurations.
ReferenceReverse proxy vs. load balancer
Reverse proxying intermediates a service; load balancing distributes work among backend instances.
ReferenceSSL termination
SSL/TLS termination decrypts one hop and requires separate assessment of the origin connection.
ReferenceRequest forwarding
Request forwarding sends an upstream exchange while preserving required HTTP semantics and metadata.
ReferenceHeader forwarding
Header forwarding must distinguish trusted proxy-generated metadata from untrusted client input.
ReferenceX-Forwarded-For
X-Forwarded-For carries proxy-chain addresses that require an explicit trusted-proxy interpretation.
ReferenceX-Forwarded-Proto
X-Forwarded-Proto reports the original scheme when supplied by a trusted proxy.
ReferenceForwarded
Forwarded standardizes selected proxy metadata including client, intermediary and scheme information.
ReferenceReal client IP
Client-IP reconstruction requires trusted intermediary boundaries rather than blindly trusting forwarded headers.
ReferenceTrusted proxies
Trusted proxies are explicitly approved intermediaries whose forwarding metadata may be accepted.
ReferenceHost headers
Host fields identify the requested authority and should be validated against accepted site names.
ReferenceReverse proxy caching
Reverse-proxy caching reuses upstream responses with keys and policies that preserve user separation.
ReferenceReverse proxy security
Reverse-proxy security protects origin trust, accepted hosts and forwarding metadata boundaries.
ReferenceWebSocket proxying
WebSocket proxying requires compatible connection establishment, long-lived forwarding and timeout handling.