How to Setup a name-based virtual host on Fedora 20
|DIFFICULTY strong>||Basic - 1 | Medium - 2 | Advanced - 3 td>|
|TIME REQUIRED strong>||15-30+ min|
|RELATED PRODUCTS strong>||Linux-based VPS or dedicated servers|
First, we need to create the document root for the virtual host we are about to create. For this example we will use coolcoolexample.com as the domain but you can use one of your own if you have one availible for this project. We will be logged in as root to complete these commands, permissions will be updated as we progress through the setup.
If this is one of many domains you plan on adding to the server, you want to make sure you create a consistent directory structure that you are able to replicate for other domains.
coolexample.com being the domain you selected for this project.
Then we need to create an index file to validate whether or not we setup the Virtual Host correctly.
Here is a snippet of code you can use to test your index file.
Virtual Host Is Working
You Have Successfully Configured an Apache Virtual Host on CentOS