NGINX is a high-performance Web server, mostly used to serve HTTP requests.
Configuration
- NGINX location directive
- NGINX HTTP variables to log
- Byte-range request
- Proxy
- NGINX realip configuration for Cloudflare
Optimization
Access Control
Code Walkthrough
- NGINX code walkthrough - Client closed request
- NGINX code walkthrough - Upstream connect timeout
- NGINX thundering herd problem
Quick Notes
- NGINX reserves a large amount of RAM if
worker_connections
is set to an unreasonable value. server_tokens
is best turned off to reduce metadata leak and save bandwidth.- Nested locations are a trap where
proxy_pass
does not get inherited. Avoid them if possible. - Increase
proxy_buffers
andclient_body_buffer_size
to save a temporary file read and write, but note that it also increases memory pressure.