Skip to content

Configuration Examples

The original NGINX Wiki contained many configuration examples and application-specific recipes. This section curates and modernizes those examples.


Full Configurations

Example Description
Full example A complete multi-server configuration with FastCGI, reverse proxy, and load balancing
Another full example Alternative configuration covering proxying, rewriting, and static files

Load Balancing & Proxying

Example Description
Simple load balancing Basic upstream load balancing with weighted servers
Reverse proxy with caching Caching proxy configuration
SSL/TLS termination HTTPS offloading and HTTP-to-HTTPS redirect
X-Accel (X-Sendfile) Internal redirects for protected file downloads
Forwarded header RFC 7239 standardized proxy headers

Server Configuration

Example Description
Server blocks Virtual hosts, wildcards, and default servers
FastCGI setup Spawning processes and securing uploads

Operations

Example Description
Systemd service Modern service management
Init scripts SysVinit, Upstart, FreeBSD rc.d, macOS launchd
Log rotation Rotating logs with USR1 signal

Application Recipes

For application-specific configurations (WordPress, Drupal, Symfony, etc.), see the Application Recipes section.