A free, self-paced textbook in 8 chapters. Read a chapter, then drill it with the 120 companion flashcards using spaced repetition.
Nginx — pronounced "engine x" — is a high-performance open-source HTTP server, reverse proxy, and IMAP/POP3 mail proxy originally written by Igor Sysoev and first released in 2004....
At the top level the configuration file lives in the main context, and from there directives branch into several nested blocks. The most important ones are http {} for HTTP-wide se...
The server {} block is nginx's virtual host. The server_name directive declares which hostnames the block responds to and supports exact names, leading wildcards (\*.example.com),...
An upstream {} block defines a named group of backend servers that nginx will load-balance across. A typical example declares several server entries, optional weights, and a keepal...
Caching in nginx is configured in two steps: declare a cache zone on disk, then opt in from a location. The proxy_cache_path directive creates a managed cache directory tree with m...
TLS is mandatory for any production site. The minimum directives to enable it on a server block are listen 443 ssl http2;, ssl_certificate pointing at the PEM file, ssl_certificate...
Access control in nginx starts with the simple allow and deny directives, which act as an ACL matched against the client IP. A typical block permits an internal subnet and rejects...
Some patterns require more than straightforward location matching. For single-page applications using HTML5 history-mode routing, every request should fall through to the applicati...