paris.us ............Views...32Home Page ........Comment(Login First)
4 Server IP


I want 4 servers to use the same dedicated IP address and each server to have its own unique domain name. How would I make that work?

The short version: Yes, you can have four servers share one dedicated IP while each server has its own domain name — but it only works if all four servers sit behind a single public‑facing machine that handles the routing.
You cannot assign the same public IP directly to four different physical servers on the open internet. You can put a reverse proxy/load balancer in front of them.

Below is the clean, real‑world way to make it work.

🧩 Core Idea
You use one public dedicated IP → point all domain names to it → then use a reverse proxy to route each domain to its correct internal server.

This is exactly how big hosting companies run thousands of domains on a single IP.

🏗️ How the Architecture Works
1. Your ISP gives you ONE dedicated public IPv4
Example:

Code
203.0.113.10
2. All four domains point to that IP
In DNS (A records):

Code
witch.us → 203.0.113.10
lydia.us → 203.0.113.10
server3domain.com → 203.0.113.10
server4domain.com → 203.0.113.10
3. You run a reverse proxy on a single “front‑end” server
This machine owns the public IP.

Use any of these:

Nginx

HAProxy

Traefik

Apache with VirtualHosts

Caddy

4. The reverse proxy routes traffic by Hostname
Example Nginx config:

Code
server {
server_name witch.us;
proxy_pass http://192.168.1.11;
}

server {
server_name lydia.us;
proxy_pass http://192.168.1.12;
}

server {
server_name server3domain.com;
proxy_pass http://192.168.1.13;
}

server {
server_name server4domain.com;
proxy_pass http://192.168.1.14;
}
Each backend server has its own private LAN IP.

🖥️ What Each Server Sees
Your four servers do not need public IPs. They only need:

Code
Server 1 → 192.168.1.11
Server 2 → 192.168.1.12
Server 3 → 192.168.1.13
Server 4 → 192.168.1.14
The reverse proxy forwards traffic internally.

🔐 SSL Certificates
The reverse proxy handles HTTPS for all domains.

Use Let’s Encrypt with:

Nginx + Certbot

Traefik (automatic)

Caddy (automatic)

Each domain gets its own certificate even though they share one IP.

🧠 Why You Must Use a Reverse Proxy
Because:

One public IP cannot be bound to multiple machines on the internet.

DNS cannot route by hostname to different IPs.

Only the server holding the public IP can accept the connection.

A reverse proxy is the only correct solution.

🧭 Alternative Options (Less Common)
Option B — Use different ports
Not recommended for websites, but possible:

Code
witch.us:80 → Server 1
lydia.us:81 → Server 2
But browsers hate this and it breaks SEO.

Option C — Use IPv6
You could give each server its own IPv6, but you asked specifically for one dedicated IPv4.

🏁 Final Answer
To make four servers share one dedicated IP while each has its own domain:

Point all domains to the same dedicated IP.

Put a reverse proxy on the machine that owns the IP.

Route each domain to its corresponding backend server by hostname.

Handle SSL at the proxy.

This is the industry‑standard solution.
0 Comments









paris.us