Tagged

Nginx guides

Hands-on guides that cover Nginx. Every command is run and verified on a live server before it is published.

Guide

An App Behind nginx

Never put your app on the public internet directly. Bind it to localhost and run nginx as a reverse proxy in front, so only nginx faces the world.

8 min read
Guide

Install Nginx and Its Config Model

Start from a bare slice: install nginx, watch it serve the default page, then learn the nginx config model, the tree of contexts every server block lives in.

9 min read
Guide

Securing Your Web Server

A hardened server with an unconfigured web server is still open. The nginx security headers, rate limiting, and TLS that close the second door.

11 min read
Guide

HTTPS and Certificates

Plain HTTP exposes passwords and sessions. Put a certbot certificate from letsencrypt.org in front of nginx, force HTTPS, and use only modern TLS.

8 min read
Guide

Put gunicorn Behind nginx

Put gunicorn behind nginx over a unix socket, forward the right proxy headers, and prove a request through nginx returns 200 from the Flask app.

6 min read
Guide

Deploys Without Downtime

Restarting your app to ship code drops in-flight requests. Run two app instances behind nginx and restart them one at a time for a zero downtime deploy.

8 min read
Guide

HTTP/2, HTTP/3 and Compression

HTTP/2 and compression are the highest speed-per-effort win on a web server. Enable both on a live server, with the nginx 1.24 version trap that trips people up.

7 min read
Guide

Caching, Static and Proxy

Nginx caches in two places: the browser and the proxy. Turn on both, prove each with the cache headers, and learn the one rule that keeps proxy caching safe.

7 min read
Guide

Hardening, Headers and Logging

Nginx hardening, made concrete: hide the version, add the security headers browsers enforce, log what an incident needs, and turn those logs into blocking.

7 min read