March 6, 2021

Host Multiple Domains on One Server/IP with Apache or Httpd

If you have a vps or dedicated-server and you are planning to host multiple domains on your server yes you can. Here are the step as follows:-

Step 1:- First map your ip/nameserver from where you bought your domain

Step 2:- Login to your Server

Step 3:- Go to apache conf location (/etc/httpd/conf/httpd.conf).

Step 4:- Open httpd.conf and go all way down to httpd conf file and write the following VirtualHost configuration:-

<VirtualHost *:80>

DocumentRoot /var/www/html/


<VirtualHost *:80>



DocumentRoot /var/www/html/directoryname/

AllowOverride All

ErrorLog logs/

CustomLog logs/ common

</VirtualHost >

Note: Change the value for DocumentRoot, ServerName, ErrorLog, CustomLog based on your requirement.

Vedant Singh

Linux System Administrator | Entrepreneur | Founder Techmion. I have started my career as a Linux system Administrator after that quit my job to start something new that excites me and started a Tech Company in order to provide the best technology to my clients. My Company website link: For Bulk, SMS-Marketing follows the link :

View all posts by Vedant Singh →

Leave a Reply

Your email address will not be published. Required fields are marked *