Skip to content

Nginx Proxy Block

Minimal nginx server block that reverse-proxies HTTP traffic to a local backend.

Source

Configuration

nginx
server {
    listen 80;
    listen [::]:80;

    server_name your-domain.com;

    access_log /var/log/nginx/reverse-access.log;
    error_log /var/log/nginx/reverse-error.log;

    location / {
        proxy_pass http://127.0.0.1:8000;
    }
}

Replace your-domain.com and 127.0.0.1:8000 with your hostname and upstream. For production, add TLS (listen 443 ssl), proxy_set_header Host $host, and WebSocket headers if needed.

Curated technical notes — open source on GitHub