Common Configuration Examples

1 min read

Authors
banner

Common Configuration Examples

Static Website

server {
    listen 80;
    server_name example.com;
    root /var/www/html;
    index index.html;
}

Reverse Proxy

server {
    listen 80;
    location / {
        proxy_pass http://localhost:3000;
    }
}

Load Balancer

upstream backend {
    server s1:8080;
    server s2:8080;
}
server {
    location / {
        proxy_pass http://backend;
    }
}

Copy-paste ready!

© 2025 Vijay Rajendran