httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: more vhost thoughts
Date Sun, 05 Oct 1997 17:30:37 GMT
Marc Slemko wrote:
> 
> 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?

Err, yeah.

> > <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.

Hmmm ... the status quo is acceptable (though it might be nice to flag
virtual hosts that can't ever match coz of lack of Listening - would
save a lot of newbie grief, particularly when SSL gets into the picture
[this was my most FAed FAQ until I tweaked the sample files]).

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 994 6435|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 994 6472|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Mime
View raw message