Skip to content

Setting up virtualhosts on CentOS7 + httpd (Keep it simple method)

let’s say, we want to configure two domains and in our server with Centos7 + httpd installation. So we have a dedicated IP say

First thing to do is to create an A record on your registrar, and point to the IP of our server which

Next, navigate to

navigate to end on that file and you will see this line:

That line will include the all the configurations files that has ending file name .conf from /etc/httpd/conf.d

Now navigate to conf.d directory:

create files and

Open and put this:

Next open and put this:

Next, we have to support SSL;

create the files again for our SSL configuration:

Open respective files and put this lines:



Now everything is full setup, we will restart our httpd service.


Published indeploymentservers

Be First to Comment

Leave a Reply

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