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.