Configuring Apache name-based virtual hosting
In this recipe we will learn how to configure name-based virtual hosting on the Apache web server.
In a previous recipe you were shown how to install the Apache web server, and where there are enormous advantages to be gained from name-based virtual hosting, it is the purpose of this recipe to show you how to enhance your current server configuration by showing you how to extend the features of the Apache web server.
Getting ready
To complete this recipe you will require a working installation of the CentOS 6 operating system with root privileges and a console based text editor of your choice. It is expected that your server will be using a static IP address and Apache is installed and currently running, and that your server supports one or more domains or subdomains.
How to do it...
For the purpose of this recipe we will be building a virtual host for web1.servername.lan
and web2.servername.lan
. These names are interchangeable and it is expected...