Short answer: A reverse proxy sits in front of your apps, receives visitors' requests and passes them to the right app behind it. Nginx is widely used for this because it's fast and efficient. It also handles HTTPS, compression and caching in one place.
What a reverse proxy does
- Routes domains: app1.yourdomain.com to one app, app2 to another.
- Terminates SSL: handles HTTPS so apps don't have to.
- Compresses and caches responses. See Gzip vs Brotli.
- Hides internal ports from the internet.
A simple example
server {
server_name app.yourdomain.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Then add a free certificate with Certbot. See free SSL certificates.
Common uses
- Node.js and Python apps. See hosting a Node.js app and hosting a Python app.
- Docker containers. See Docker on a VPS.
- Several sites on one server.
Frequently asked questions
Is a reverse proxy the same as a CDN?
No. A CDN is a network of servers worldwide; a reverse proxy usually runs on your own server. See what a CDN is.
Does it slow things down?
The overhead is tiny, and caching often makes sites faster.



