Skip to content

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

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

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

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 example1.com.conf and  example2.com.conf

Open example1.com.conf and put this:

Next open example2.com.conf and put this:

Next, we have to support SSL;

create the files again for our SSL configuration:

Open respective files and put this lines:

for example1.com:

for example2.com:

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 *