How to Host Multiple Websites on a VPS

A VPS (Virtual Private Server) gives you full control of your hosting environment, making it possible to run more than one website on the same server. This is a cost-effective and efficient solution for developers, freelancers, and businesses managing multiple projects.

In this tutorial, we’ll walk you through the steps to host multiple websites on a single VPS.


✅ Prerequisites

  • A VPS with root access (you can get one from Hosteons VPS Plans)
  • A domain name for each website you want to host
  • Basic knowledge of Linux commands

🔹 Step 1: Update Your Server

Keep your VPS up to date with the latest security patches.

apt update && apt upgrade -y   # For Ubuntu/Debian  
yum update -y                  # For CentOS/AlmaLinux  

🔹 Step 2: Install a Web Server

Choose between Apache or Nginx.

For Apache:

apt install apache2 -y   # Ubuntu/Debian  
yum install httpd -y     # CentOS/AlmaLinux  

For Nginx:

apt install nginx -y  
yum install nginx -y  

🔹 Step 3: Set Up Directories for Each Website

Create separate folders for your websites. Example:

mkdir -p /var/www/site1.com/public_html  
mkdir -p /var/www/site2.com/public_html  

Assign permissions:

chown -R www-data:www-data /var/www/*  
chmod -R 755 /var/www/*  

🔹 Step 4: Configure Virtual Hosts

For Apache, create a new config file for each domain:

nano /etc/apache2/sites-available/site1.com.conf

Add:

<VirtualHost *:80>
    ServerName site1.com
    DocumentRoot /var/www/site1.com/public_html
</VirtualHost>

Enable the site:

a2ensite site1.com.conf
systemctl reload apache2

For Nginx, edit the server block:

nano /etc/nginx/sites-available/site1.com

Add:

server {
    listen 80;
    server_name site1.com;
    root /var/www/site1.com/public_html;
}

Enable it:

ln -s /etc/nginx/sites-available/site1.com /etc/nginx/sites-enabled/
systemctl reload nginx

Repeat for each domain.


🔹 Step 5: Update DNS Records

Point each domain’s A record to your VPS IP address in your domain registrar’s DNS settings.


🔹 Step 6: Enable SSL with Let’s Encrypt

Install Certbot:

apt install certbot python3-certbot-apache -y   # Apache  
apt install certbot python3-certbot-nginx -y    # Nginx  

Issue an SSL certificate:

certbot --apache -d site1.com -d www.site1.com  
certbot --nginx -d site2.com -d www.site2.com  

🔹 Step 7: Test Your Setup

Visit your domains in a browser to confirm they are loading correctly and secured with HTTPS.


✅ Conclusion

With a VPS from Hosteons, you can host multiple websites easily by setting up virtual hosts or server blocks, configuring DNS, and enabling SSL. This lets you manage multiple projects on a single server while saving costs and maintaining flexibility.

👉 Get started with a VPS today: https://hosteons.com

How to Host Multiple Websites on a Single VPS

If you manage multiple projects or clients, hosting all your websites on a single VPS can be cost-effective and efficient. With proper configuration, one VPS can run multiple domains, each with its own files, databases, and security settings.

In this guide, we’ll explain how to host multiple websites on one VPS using simple, practical steps.


✅ 

Why Host Multiple Sites on One VPS?

  • Cost Savings: Pay for one VPS instead of multiple hosting plans.
  • Better Resource Control: Allocate CPU, RAM, and storage as needed.
  • Full Customization: Choose your own control panel, stack, and security settings.
  • Scalability: Easily upgrade your VPS resources as traffic grows.

✅ 

Step 1: Choose the Right VPS Plan

Hosting multiple websites requires enough resources to handle combined traffic and workloads. For small to medium sites, start with:

  • 2–4 GB RAM
  • 2+ vCPU cores
  • 40–80 GB SSD/NVMe storage

👉 Explore VPS plans:


✅ 

Step 2: Install a Web Server

You need a web server to host websites. Popular choices include:

  • Apache
  • Nginx
  • LiteSpeed (for higher performance)

Example for Ubuntu:

sudo apt update
sudo apt install apache2 -y

✅ 

Step 3: Configure Virtual Hosts

Create separate virtual host files for each domain.

Example for Apache:

<VirtualHost *:80>
    ServerName example1.com
    DocumentRoot /var/www/example1
</VirtualHost>

<VirtualHost *:80>
    ServerName example2.com
    DocumentRoot /var/www/example2
</VirtualHost>

Enable sites:

sudo a2ensite example1.conf
sudo a2ensite example2.conf
sudo systemctl reload apache2

✅ 

Step 4: Add DNS Records

Point each domain to your VPS IP using A records in your domain registrar’s DNS settings.


✅ 

Step 5: Secure with SSL (HTTPS)

Use Let’s Encrypt for free SSL certificates:

sudo apt install certbot python3-certbot-apache
sudo certbot --apache

✅ 

Step 6: Optimize for Performance

  • Enable caching (Varnish, Redis, or Nginx cache)
  • Use Cloudflare CDN for speed and DDoS protection
  • Monitor resource usage and scale when needed

✅ 

Step 7: Consider a Control Panel

If you’re managing many sites, a control panel like DirectAdminCyberPanel, or ISPConfig makes management easier.


✅ 

Benefits of Using Hosteons VPS for Multiple Websites

  • 10Gbps Network Ports for ultra-fast connections
  • Full Root Access for complete control
  • KVM Virtualization for dedicated resources
  • Affordable Plans starting at $2.99/month
  • IPv6 Ready and Multiple Locations

👉 Start hosting multiple websites today:

Order Your VPS


Final Thoughts

Hosting multiple websites on a single VPS is a smart way to save costs and maintain control. With proper configuration, security, and resource management, your sites can run smoothly from one powerful VPS.