|
Virtual Hosts
by Zachary Zerries
Virtual hosts are responsible for
running more than one web site on a single
machine. Virtual hosts can be "IP-based,"
which means they offer a different IP
address for every web site, or
"name-based," which allows their customers
to have multiple names running on each IP
address. In fact, it's never apparent to
the client that both sites are running on
the same physical server.
Apache software was one of the first
servers to support IP-based
Virtual Hosts. Apache Versions 1.1 and
later support both IP-based and name-based
virtual hosts, or vhosts. A big difference
between IP-based and name-based virtual
hosts is the need for separate IP
addresses for each host. When it comes to
name-based virtual web hosting, the server
relies on the client to report the host
name as part of the HTTP headers;
therefore, many different hosts can share
the same IP address.
How to Use Name-Based Virtual Hosts
Designating an IP address on the server
will allow to use name-based virtual
hosting. The server will accept requests
for the hosts, and all IP addresses on the
server should be used. It's important to
note that mentioning an IP address in a
virtual host name directive does not
automatically make the server listen to
that IP address. Moreover, an IP address
that's specified must be associated with a
network interface on the server.
Virtual hosts play an active role in
many web hosting companies. They help
people reach and connect with more
potential clients on the Internet. If you
run a web-based business, virtual hosting
is one feature definitely worth checking
out. |