CloudLinux.ro
Web servers

How to host multiple sites on one server

Updated 7/20/2026

A single VPS can host dozens of sites. In Nginx, each site is a separate "server block", identified by its domain.

1. One directory per site

mkdir -p /var/www/site-a /var/www/site-b

2. One server block per domain

/etc/nginx/sites-available/site-a:

server {
    listen 80;
    server_name site-a.com www.site-a.com;
    root /var/www/site-a;
    index index.html;
}

Same for site-b, with its own server_name and root.

3. Enable them

ln -s /etc/nginx/sites-available/site-a /etc/nginx/sites-enabled/
ln -s /etc/nginx/sites-available/site-b /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx

4. Point each domain

Both domains point to the same server IP. Nginx picks the right site by server_name. See How to point a domain to your VPS.

Money-saving tip

With hourly billing, one larger VPS hosting several sites often costs less than several separate small plans.

Put this guide into practice on your own VPS

EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.

See pricing

Related tutorials