Lion Cipher Lab

Stand up and harden an nginx web server

Why it matters

Reading a site's defences is one skill; building them is the other half, and it is where the levers actually live. When you run your own web server, every protection is a config line you own: whether traffic is encrypted, which TLS ciphers are allowed, which security headers the browser receives, whether your software version is broadcast to every visitor, and how large a request you will accept before rejecting it. A default install answers all of those in the most permissive, least-safe way. This lab walks the same server from a bare default to a hardened baseline, so that the headers you…

What you'll learn

Steps in this lab

  1. What you're building, and the rule of the lab
  2. Install nginx and serve a page
  3. Turn on TLS: Let's Encrypt for a real domain, self-signed for the lab
  4. Get a strong cipher configuration from Mozilla — don't invent one
  5. Set the security headers — this is the build side of the reading lab
  6. Stop advertising your version: server_tokens off
  7. Trim the attack surface: unused modules and request-size limits
  8. Test, reload, and what you've actually built

Open the full interactive lab →