Lion Cipher Lab

Set up a reverse proxy with Caddy

Why it matters

Almost every real web setup, from a hobby project to a large company, puts a reverse proxy in front of the actual application. It is the single most common piece of web infrastructure there is, and understanding it demystifies how the sites you use are actually wired. A reverse proxy gives you one controlled front door: it is where encryption (HTTPS) is turned on, where you can attach security headers, and where the real app is kept out of direct reach. Learning it on your own machine with Caddy — which handles the historically painful certificate step automatically — means the first time you…

What you'll learn

Steps in this lab

  1. What a reverse proxy is, and why put one in front
  2. Get a terminal open and a local app to proxy
  3. Install Caddy
  4. Prove the idea with a one-line reverse proxy
  5. Write a tiny Caddyfile
  6. You already have HTTPS: automatic local TLS
  7. Add security headers at the front door
  8. Validate, reload, and what you built

Open the full interactive lab →