Mon. Dec 9th, 2019

Host your Website

Read and learn

FatCow Web Hosting $1.00/mo* Trust your web hosting to the #1 web host provider, GoDaddy!

How to create virtual hosts on Apache (httpd) on CentOs 7

1 min read

Free Linux Cheat Sheet Download:

Using virtual hosts on Apache allows you to host multiple websites on one server. In order for virtual hosts to function correctly you will need to insure that you have DNS set up correctly for your sites. If you are following this tutorial for test purposes you can reference this video on how to manually set DNS on a Centos Server:

If you need to know how to install apache on CentOs you can reference this video:

The commands that you need to follow this video can be found here:

How to create virtual hosts on Apache (httpd) on CentOs 7

8 thoughts on “How to create virtual hosts on Apache (httpd) on CentOs 7

  1. Hi, I've recently had this as a beginner task to a new job I've started. My task involves making the second site use port 4445. How can this be done? Every time I include "Listen 4445" in the httpd.conf file both sites stop working. If I change the file then it just shows site1's content when going to for example. Not sure what I'm not seeing here.
    Thanks for the video btw Darren, found your channel when researching my issue earlier today, went to reddit to see what I could find there and found your post about making Centos videos, they're very informative from one Irish lad to another, its appreciated!

  2. All good, but, how can I access from other sistem? I'm doing this on VMWare, but I can't get access to the sites from the browser on other virtual machine.
    Great video.

  3. I am getting "ln: failed to create symbolic link ‘/etc/httpd//Sites_Enabled/’: No such file or directory", Do I need to create the conf files before running this script?

  4. Darren thanks for the tutorial. I was able to follow the instructions to set up vhost, however I am unable to view and When I put my local IP for the website server (, it says "This is site1". Any tips on what to fix? This is the second time I am doing this again with a fresh CentOS7 box and I just can't get the padlock to come up.
    Thanks for the video

Comments are closed.

Copyright © All rights reserved. | Newsphere by AF themes.