Virtual Hosts

A
virtual host is a name that users can type into a URL. For example, theory.cs.uchicago.edu, people.cs.uchicago.edu, and www.cs.uchicago.edu are all virtual hosts. Through the magic of HTTP, a single server can host many virtual hosts.

There are two important parts to setting up a virtual host. First, the server must be configured to answer to the name of the virtual host. This is accomplished in the Apache Configuration. Second, and equally important, the browser must have a way to find out that which server to contact to get a page from the virtual host. This is done with DNS CNAME records, the details of which are beyond this documentation. Remember, both parts must be in place before a virtual host will work.