Disclosure: this page contains affiliate links. If you buy through them we may earn a commission at no extra cost to you.

A reverse proxy sits in front of your apps, handling HTTPS and routing requests. It’s how one VPS runs many services on ports 80 and 443.

Basic reverse proxy

Route a domain to an app running on port 3000:

server {
    listen 80;
    server_name app.example.com;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

Add WebSocket support

For real-time apps, pass the upgrade headers:

proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

Terminate HTTPS once

Let Nginx handle TLS with a Let’s Encrypt certificate, while backends stay on plain HTTP internally. Set timeouts (proxy_read_timeout) for long-running requests, and enable proxy_buffering for big responses.

This is the standard pattern for Node, Python, and Go apps. It needs little RAM — RackNerd’s 2 GB plan at $35.99/yr comfortably fronts several backends with full root.

See RackNerd's current deals