nginx Knowledge

Kip Landergren

(Updated: )

My nginx knowledge base that evolves as I learn more.

Contents

Overview

nginx is a rock-solid, performant, and lightweight web server written in C. It is built on on an event-driven architecture that helps maximize its ability to handle concurrent connections, and as such is often deployed as a reverse proxy.

Core Idea

Spawn worker processes that respond to OS events rather than blocking on I/O. In general: be as non-blocking as possible.

Key Concepts

External Resources

Nginx Terminology

block directive
a configuration instruction that has the same structure of a simple directive but ends with braces ({ and }) that may contain other instructions
context
a block directive that may contain other directives
simple directive
a configuration instruction consisting of a name and parameters separated by spaces, ending in a semicolon (;)