Setup & Tech Guides9 min read•Last updated: •By SkyRain Cloud Team

Setting Up a Reverse Proxy on a Dedicated Server

As soon as one dedicated server hosts more than one application, you need something at the front door that decides which request goes where. A store, an API, an admin dashboard and a staging site might all live on the same machine. A reverse proxy on a dedicated server is that front door: it receives every web request, handles HTTPS and sends traffic to the right application behind it.

The short answer: install Nginx, Caddy or Traefik as the only service listening on ports 80 and 443, terminate TLS there, route by domain or path to applications listening privately, and add caching, compression, rate limits and security headers in one place. This guide explains why a reverse proxy matters, how to choose one, a working setup and the mistakes to avoid.

Quick answer

A reverse proxy on a dedicated server is a web server (such as Nginx, Caddy, Traefik or HAProxy) that sits in front of your applications, receives all incoming HTTP and HTTPS traffic, terminates TLS, and forwards each request to the right backend based on hostname or path. It lets many apps share one IP, centralises certificates, caching, compression, rate limiting and security headers, and keeps the applications themselves off the public internet.

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.
Reverse proxy on a dedicated server – SkyRain Cloud bare metal servers in India

Choosing a reverse proxy

ProxyStrengthsGood fit
NginxFast, mature, flexible caching and rate limiting; huge documentationMost business servers, PHP and mixed stacks
CaddyAutomatic HTTPS by default, very short configurationSmall teams wanting simplicity
TraefikDiscovers Docker containers automatically via labelsContainer-heavy setups
HAProxyHigh-performance load balancing and TCP proxyingLoad 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

  1. Make sure each application listens on a private address, for example 127.0.0.1:3000 for a Node.js app and 127.0.0.1:8080 for an API.
  2. Install Nginx and open only ports 80 and 443 in the firewall.
  3. Create a server block per domain that forwards to the right backend.
  4. Issue certificates with Certbot or another ACME client.
  5. Add security headers, compression and timeouts.
  6. 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

PatternExampleUse when
By hostnameshop.example.in → store, api.example.in → APISeparate apps or clients
By path/api → API, / → websiteOne domain, several services
By header or cookieBeta users → new versionGradual rollouts
Upstream groupSeveral app instancesSpreading 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_timeout values 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?
It receives all incoming web traffic, handles HTTPS, and forwards each request to the right application based on domain or path, so many apps can share one server and IP securely.
Which reverse proxy should I use?
Nginx suits most business servers, Caddy is simplest for automatic HTTPS, Traefik fits Docker-heavy setups and HAProxy excels at load balancing. Choose the one your team knows.
Can I host several websites on one IP with a reverse proxy?
Yes. The proxy routes by hostname, and modern TLS (SNI) lets each site have its own certificate on the same IP.
Does a reverse proxy make websites faster?
It can, through caching, compression and HTTP/2 or HTTP/3. Most of the gain comes from caching pages and static files so the application does less work.
Is a reverse proxy a security tool?
Partly. It keeps applications off the public internet, centralises TLS, rate limits and headers. It does not replace application security or updates.
Can I run Nginx or Traefik on a SkyRain Cloud dedicated server?
Yes. You get full root access to install any reverse proxy, and DDoS protection is included on the network in front of it.

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.

PlanCores / ThreadsRAMStorageNetworkPriceGood forBuy
Business
2× Intel Xeon E5-2699 v4 (Mumbai / Delhi)
44 / 88 (2.2 GHz base, 3.6 GHz turbo)128 GB DDR4 ECC1 TB NVMe SSD1 Gbps₹17,999/monthBusiness websites, stores, databases, ERP and many client sitesOrder
Enterprise
2× Intel Xeon Platinum 8269CY (Mumbai / Delhi)
52 / 104 (2.5 GHz base, 3.8 GHz turbo)128 GB DDR4 ECC1 TB NVMe SSD1 Gbps₹19,999/monthVirtualization hosts, large databases, SaaS and container platformsOrder
CustomMore RAM or storage, a second server for failover, or several servers for a cluster: quoted by the team.Clusters, failover pairs, unusual specsAsk

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.

Instant UPI • ₹649/mo
Fast KVM Cloud Provisioning