[plug] Apache non-ip virtual hosting
Trevor Phillips
phillips at central.murdoch.edu.au
Mon May 31 16:26:44 WST 1999
Bret Busby wrote:
>
> For the sake of those of us, who do not understand this one, and would
> like to understand, could someone please explain what non-ip-aliasing
> is, how it relates to ip-aliasing, and the ip virtual hosting, and how
> it all relates to the different versions of http?
By ip-aliasing they're referring to the hosting of multiple websites on
a server with a different IP for each server.
Example:
Say I had a server called penguins.org, and another called pcpcp.com. I
could host separate webservers on the same machine by having two IP's,
one for each name. Depending on what IP the request comes in on, it
returns one site or another. This sort of multiple-service can be done
with other servers too, as it's UNIX System that determines what request
goes where.
However, it's not always practical to have separate IP's, just to have
different servers. In the HTTP/1.1 spec, it was REQUIRED that an
incoming request from a client include information about what server
they are contacting (I believe the header was "Host:" but don't quote me
on it). ie; The browser tells the server which site-name it is after.
As a result, if we have our previous example, we can host BOTH sites on
the ONE ip address. All requests go to the one IP, and all are handled
by the same server, but after that, as long as that host header is
included, the server can treat it as one server, or another.
The main advantage is only one IP is required, so you could feasably
host hundreds of sites off one server with one IP. It puts the server
configuration into the hands of the Webserver maintainer, not the local
IP maintainer.
The main disadvantage is HTTP/1.0 does NOT include this, and so some old
browsers won't work (will usually get the default site). HTTP/1.1 does
have a slew of other nifty things as well, and so some clients
communicate with "HTTP/1.0", but still include the host header.
I think there's a way with Apache to set it up so that for old browsers,
it can give out a different URI, thus allowing Virtual servers to work,
and if not, still being capable of serving both sites.
ie;
penguins.org may become 111.222.133.144/penguins
and
pcpcp.com would become 111.222.133.144/pcpcp
I've yet to look into this (altho I'll have to soon, as we're branching
into name-based virtual servers...)
--
. Trevor Phillips - http://jurai.murdoch.edu.au/ .
: CWIS Technical Officer - T.Phillips at murdoch.edu.au :
| IT Services - Murdoch University |
>------------------- Member of the #SAS# & #CFC# --------------------<
| On nights such as this, evil deeds are done. And good deeds, of /
| course. But mostly evil, on the whole. /
\ -- (Terry Pratchett, Wyrd Sisters) /
More information about the plug
mailing list