httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@nueva.pvt.k12.ca.us>
Subject Re: virtual hosts failing (fwd)
Date Sun, 21 Apr 1996 19:31:42 GMT
On Sun, 21 Apr 1996, Rob Hartill wrote:

> > Apache's working exactly as it's supposed to, therefore, it's just
> > your configuration that was a bit screwed up.
> 
> thanks. I'll pass that on to the culprit  :-)
> 
> So, would this have worked under 1.0.3?   I never tried it from
> anything other than Netscape. None of our lynx users complained
> with 1.0.3

Yes, it would have worked fine, at least as far as uk.imdb.com was
concerned.

> Presumably, Apache is now quietly ignoring some misconfiguration.
> Wouldn't it be better to at least write something to STDERR on
> startup (most people start a new Apache from the command line
> for the first time).

It wasn't really a misconfig under 1.0.3. It was just a Bad Idea, but
legal, actually. Here's the problem:

The main server was set to think it was movie.pcug.co.uk, which
translates to 192.68.174.59. There was also a virtualhost set on
uk.imdb.com, with is also 192.68.174.59. So whenever a request on the
192.68.174.59 interface came in, it looked first at the virtualhosts,
found a matching one, and used it. In other words, the main server was
just always ignored - unless you had other interfaces for the machine
that you didn't have virtual hosts for; olive.pcug.co.uk was one of
those, presumably. Requests to that machine would have seemed to work
fine, unless a redirect was sent, in which case it would have
redirected to the wrong interface. Oops.

Now, under 1.1, it checks each virtualhost to see if it has the same
IP address as the main interface (as defined by ServerName), and if it
does, it disables that virtualhost when matching IP addresses (it
still checks them when matching Host headers). This additional check
was neccessary to implement Host-parsing transparently to the user.

Hope this helps...

-- 
________________________________________________________________________
Alexei Kosut <akosut@nueva.pvt.k12.ca.us>    
URL: http://www.nueva.pvt.k12.ca.us/~akosut/  
Lefler on IRC, DALnet <http://www.dal.net/>   


Mime
View raw message