Virtual Hosting

Virtual hosting is the practice of keeping the Web site contents for multiple different domains or hostnames on the same server; a single installation of Apache serves requests for all of them. For instance, www.mystore.com and www.frankspage.com might both be configured in DNS to point to the same IP address on your FreeBSD machine, and Apache is responsible for serving both of them, as well as its own hostname (as specified in the ServerName directive).

As we've seen, HTTP/1.0 provided no indication of what hostname the HTTP client was trying to reach (as specified by the user), so in earlier days, virtual hosting had to be done by pointing each hostname to a separate IP address and then binding each IP address as an IP alias ...

Get FreeBSD® Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.