NETWORKING / A CONCEPT NOTE

Reverse Proxy

the middleman in front of your app

~65 sec read

Overview · mechanism
pitfall · examples

01 / THE SHORT VERSION

The idea in a few sentences.

A server (like Nginx, HAProxy, Caddy) placed in front of your applications. It receives client requests, handles SSL termination, compression, and routes traffic to internal backends.

02 / FOLLOW THE MECHANISM

How a reverse proxy flows

  1. Client

    sends a request to https://supraj.dev.

  2. Proxy

    terminates the TLS connection, checks headers and path.

  3. Forwarding

    proxy forwards the request over unencrypted HTTP (or internal TLS) to backend 10.0.1.5:3000.

  4. Response

    proxy buffers the backend response and streams it back to the client.

04 / COMMAND NOTES

Read the command, then the result.

Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.

EXAMPLE 01 · REFERENCE

test Nginx configuration syntax

nginx -t

EXAMPLE 02 · REFERENCE

query proxy locally

curl -I -H 'Host: supraj.dev' http://localhost

Explore command anatomy in the CLI lab