httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: IP v. Host based virtualhosts
Date Sun, 09 Feb 1997 03:17:53 GMT
Oh my, I certainly wasn't paying attention back then (way too busy at
work).  I would have fought hard for <HostAlias>.  See some of my rants in
early 96 (subject includes "security").

The problems going on now are mostly user error, but compounded by the
following facts (I think we went through all this when Brian had a problem
with hyperreal's config).  I'm pretty sure the following are all still
true:

- <VirtualHost> sections are scanned LAST to FIRST (i.e. last in the file
    is the first on the linked list of servers)

- the last vhost to name-match (i.e. the closest to the top of the file)
    is the one that will be served

- it is possible to name-match a server which doesn't ip-match (and possibly
    not even port-match, I seem to recall ports being ignored during
    name-matching).  To be fair, we document this behaviour.

- if you have a virtualhost for the server's "main ip address" then it
    immediately gets treated as a name-vhost (despite the presence/lack of
    other name-vhosts).  I run into this because I don't like the "main
    server" having loads of stuff which is "inherited" into all vhosts.
    I typically have to work around it by using a vhost with ip
    255.255.255.255.

Dean

On Fri, 7 Feb 1997, Alexei Kosut wrote:

> >From various bug reports and things, it seems Apache has trouble
> determining what's real and what isn't when it comes to virtual
> hosts. Now, this has always been iffy, and I imagine the changes in
> 1.2 to the <VirtualHost> functionality may have made it more vauge;
> people are certainly having problems with it.
> 
> Now, the first time I wrote the Host-based virtual host code, for
> Apache 1.1 (I ended up writing it four times; the fourth is what we
> have now, although it's been since modified), I did not use the
> <VirtualHost> section. I used a seperate section type, <HostAlias> (in
> case anyone wondered about the origin of the name of the
> check_hostalias() function, it comes from that). However a couple
> people (I won't name names) insisted that we keep the <VirtualHost>
> syntax, to make it "easy" for people to migrate from one type of
> virtual host to the other (presumably because they'd only have to
> change the DNS records, not the server config). Although at the time I
> didn't really care one way or the other, in the year since, I've grown
> more and more convinced that my original plan was correct, and I think
> it would have prevented a lot of the problems and confusion that
> resulted from the implementation that ended up in 1.1.
> 
> At any rate, I'm wondering if people think it might not be a good idea
> to rethink this, to recode it as a seperate section (I perfer
> <ServerAlias>, since it would have the same function as that directive
> now, and is nice-sounding name) to clearly distinguish one type of
> virtual host from another?
> 
> We could support the current scheme as well, but if the server thinks
> that the user is putting a Host-based virtual host into <VirtualHost>
> (using the same logic we use now), it would give a warning on startup
> recommending he switch it over to a <ServerAlias> section, or check
> his config or something.
> 
> -- 
> ________________________________________________________________________
> Alexei Kosut <akosut@nueva.pvt.k12.ca.us>      The Apache HTTP Server
> URL: http://www.nueva.pvt..k12.ca.us/~akosut/   http://www.apache.org/
> 
> 


Mime
View raw message