Apache’s Virtual Hosting Capabilities
When you set up Apache on an Internet host it can respond to an HTTP request for that host. For example, if you set up Apache on a host called server1.doman.com, Apache will serve HTTP requests for this host. However, if you set up your DNS records such that two other hostnames (say www. mycompany-domain.com and www.friendscompanydomain. com) point to the same machine, you can have Apache serve these two domains as virtual Web sites. In such a case www.mycompany-domain.com is considered the primary Web hostname (main server) and the rest of them will be considered as virtual Web site or virtual hosts. Apache allows virtual hosts to inherit configuration from the main server, which makes the virtual host configuration quite manageable in large installations where some contents can be shared. For example, if you decided only to have a central CGI repository and to allow virtual hosts to use the scripts stored there, you do not need to create a ScriptAlias directive in each v...