Why put a reverse proxy in front of your applications?
- Many apps, one IP: route shop.example.in, api.example.in and admin.example.in to different backends.
- One place for HTTPS: certificates are issued and renewed centrally.
- Security: applications listen only on localhost or a private network; only the proxy is public.
- Performance: caching, compression, HTTP/2 and HTTP/3 handled once for everything.
- Control: rate limits, IP allow lists and security headers in one configuration.
- Flexibility: move an app to a new port, container or server without changing DNS.

Choosing a reverse proxy
| Proxy | Strengths | Good fit |
|---|---|---|
| Nginx | Fast, mature, flexible caching and rate limiting; huge documentation | Most business servers, PHP and mixed stacks |
| Caddy | Automatic HTTPS by default, very short configuration | Small teams wanting simplicity |
| Traefik | Discovers Docker containers automatically via labels | Container-heavy setups |
| HAProxy | High-performance load balancing and TCP proxying | Load balancing across several servers |
For container platforms, see Docker on dedicated servers. The Nginx proxy module documentation covers every directive used below.
Setting up a reverse proxy on a dedicated server with Nginx
- Make sure each application listens on a private address, for example
127.0.0.1:3000for a Node.js app and127.0.0.1:8080for an API. - Install Nginx and open only ports 80 and 443 in the firewall.
- Create a server block per domain that forwards to the right backend.
- Issue certificates with Certbot or another ACME client.
- Add security headers, compression and timeouts.
- Reload Nginx and test each domain.
A minimal server block looks like this:
server {
listen 443 ssl http2;
server_name api.example.in;
ssl_certificate /etc/letsencrypt/live/api.example.in/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/api.example.in/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Add a port 80 block that redirects everything to HTTPS, and make your application trust the forwarded headers so it logs real client IPs.
Features to switch on at the proxy
Caching
Nginx can cache responses from backends (FastCGI or proxy caching), serving popular pages without touching the application. Exclude logged-in users, carts and admin areas.
Compression
Enable gzip or Brotli for text responses so pages travel faster.
Rate limiting
Limit requests per IP on login, search and API endpoints. This is one of the cheapest defences against bots and small floods; see protecting a dedicated server from DDoS.
Security headers
Set Strict-Transport-Security, X-Content-Type-Options, Referrer-Policy and a Content-Security-Policy suitable for each app.
Access control
Restrict admin paths to your office IP or VPN range, and add basic authentication in front of staging sites.
Routing patterns
| Pattern | Example | Use when |
|---|---|---|
| By hostname | shop.example.in → store, api.example.in → API | Separate apps or clients |
| By path | /api → API, / → website | One domain, several services |
| By header or cookie | Beta users → new version | Gradual rollouts |
| Upstream group | Several app instances | Spreading load across processes or servers |
When you outgrow one server, the same proxy can spread traffic across several backends; see load balancing explained.
Reverse proxy plus CDN
A CDN sits in front of your reverse proxy, caching static files close to visitors and hiding your server's IP. The proxy then only sees traffic from the CDN, which you can restrict at the firewall. Our guide to configuring a CDN with your dedicated server covers the combined setup.
WebSockets, uploads and long requests
Modern applications do more than serve pages. Chat features, live dashboards and notifications use WebSockets, which need the proxy to pass the Upgrade and Connection headers and to allow long-lived connections. File uploads need a sensible client_max_body_size, set per site rather than globally, so a document portal can accept large files while the main website keeps a tight limit. Reports and exports that take minutes should run as background jobs where possible; if they must run over HTTP, raise timeouts only for those specific paths. Getting these details right in the proxy avoids mysterious disconnects that look like application bugs.
Zero-downtime deploys behind a proxy
A reverse proxy makes deployments smoother. Run the new version of an application on a different port or container, check its health endpoint, then switch the proxy's upstream and reload. Nginx reloads gracefully, finishing in-flight requests on old workers while new ones use the new configuration, so visitors see no interruption. Traefik does this automatically when container labels change. Keep the previous version running for a few minutes so you can switch back instantly if errors appear. This simple blue-green pattern works on a single dedicated server and scales naturally when you add more.
Staging and internal tools
The same proxy can publish staging copies and internal tools safely. Put staging on its own subdomain protected by basic authentication or an IP allow list, add a noindex header so search engines ignore it, and route internal dashboards such as monitoring or queue managers only to VPN addresses. Because everything passes through one configuration, it is easy to audit exactly what is reachable from the internet and by whom.
Logging and troubleshooting
- Log the upstream response time alongside the total request time, so you can tell whether slowness is in the proxy or the app.
- Watch for 502 and 504 errors, which usually mean the backend is down or too slow.
- Set sensible
proxy_read_timeoutvalues for long-running exports instead of raising them globally. - Rotate logs and ship them off the server.
A hypothetical setup
A small software company runs its marketing site, customer portal, REST API and a staging copy on one dedicated server. Each runs in its own container on a private port. Nginx is the only public service: it serves www and the portal with HTTPS, routes /v1 traffic to the API with a stricter rate limit, caches the marketing pages for anonymous visitors and puts staging behind a password. When the API needs an update, the team starts the new container, flips the upstream and reloads Nginx with no visible downtime.
Reverse proxy mistakes
- Applications still listening on public interfaces, bypassing the proxy.
- Forgetting to pass the real client IP, breaking rate limits and logs.
- Caching pages for logged-in users.
- Certificates that fail to renew because port 80 is closed.
- One giant configuration file nobody understands; use one file per site.
For speed tuning beyond the proxy, see optimising page speed on a dedicated server.
Why businesses choose SkyRain Cloud dedicated servers
Teams run their reverse proxies on SkyRain Cloud Intel Xeon dedicated servers because:
- Indian data centers, Indian latency. Intel Xeon dedicated servers are hosted in Mumbai and Delhi, close to customers across India.
- The whole machine is yours. 100% unshared hardware: no other tenants competing for CPU, memory or disk.
- DDoS protection included on the network, so a flood aimed at your IP does not have to become your problem alone.
- Full control. Root or Administrator access plus iLO/IPMI out-of-band management to reboot, reinstall or mount your own ISO.
- Real support channels. 24/7 support tickets, WhatsApp and a Discord community, plus a public status page.
- Simple billing. Monthly billing in rupees with UPI, net banking and cards.
Frequently Asked Questions
What does a reverse proxy do on a dedicated server?
Which reverse proxy should I use?
Can I host several websites on one IP with a reverse proxy?
Does a reverse proxy make websites faster?
Is a reverse proxy a security tool?
Can I run Nginx or Traefik on a SkyRain Cloud dedicated server?
Conclusion
A reverse proxy on a dedicated server turns one machine into a tidy platform for many applications: one public entry point, central HTTPS, caching, rate limits and security headers, with every app kept private behind it. Start with Nginx, Caddy or Traefik and a file per site.
Compare the plans below, or order directly on our Intel Xeon dedicated server store page.
SkyRain Cloud Dedicated Server Plans
Unshared Intel Xeon bare-metal servers in Mumbai and Delhi data centers with 1 Gbps connectivity. Every plan includes iLO / IPMI out-of-band management, DDoS protection, Full root / Administrator access, Additional IPv4 addresses available and Billed monthly.
| Plan | Cores / Threads | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| Business 2× Intel Xeon E5-2699 v4 (Mumbai / Delhi) | 44 / 88 (2.2 GHz base, 3.6 GHz turbo) | 128 GB DDR4 ECC | 1 TB NVMe SSD | 1 Gbps | ₹17,999/month | Business websites, stores, databases, ERP and many client sites | Order |
| Enterprise 2× Intel Xeon Platinum 8269CY (Mumbai / Delhi) | 52 / 104 (2.5 GHz base, 3.8 GHz turbo) | 128 GB DDR4 ECC | 1 TB NVMe SSD | 1 Gbps | ₹19,999/month | Virtualization hosts, large databases, SaaS and container platforms | Order |
| Custom | More RAM or storage, a second server for failover, or several servers for a cluster: quoted by the team. | Clusters, failover pairs, unusual specs | Ask | ||||
Prices are monthly in INR as listed on the SkyRain Cloud store (verified 2026-11-23). Live stock and final price are shown at checkout.