httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@worldgate.com>
Subject Re: more vhost thoughts
Date Sun, 05 Oct 1997 15:53:52 GMT
On Sun, 5 Oct 1997, Ben Laurie wrote:

> Marc Slemko wrote:
> > 
> > On Sun, 5 Oct 1997, Dean Gaudet wrote:
> > 
> > > 2.
> > >
> > > The Port directive is a non-intuitive mess when applied to vhosts.  Consider:
> > >
> > >     <VirtualHost 127.0.0.1>
> > >       Port 8080
> > >     </VirtualHost>
> > >
> > > That's a vhost on port 80, which will issue redirects indicating port 8080.
> > > Solution?
> > 
> > I am more concerned about the case where someone makes a vhost on a
> > different port (eg. main server port 80, vhost 8080) and forget the Port
> > directive.  I'm afraid I'm not entirely clear on what the Port directive
> > does that can't be figured out by what port something is really on.
> 
> Confuses me, too ... if I want to have hosts on two ports I usually do
> something like:
> 
> Port 80
> Listen 81

You need a Listen 80 too, don't you?

> 
> <VirtualHost foo:81>
> .
> .
> .
> </VirtualHost>
> 
> I still haven't figured out why I have to do the Listen (conceptually,
> that is, rather than what the code does). 

This one I can go for.  I like telling Apache explicitly what sockets it
needs to open.  Ports are different, but without Listen Apache wouldn't
know what IPs to listen to when you don't want it wildcarded.  Trying to
guess that from the VirtualHost directive isn't possible.

Guessing the port is possible, but I prefer Apache guessing as little as
possible.  We tried that with the VirtualHost directive for non-IP virtual
hosts.


Mime
View raw message