httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: more vhost thoughts
Date Mon, 06 Oct 1997 00:42:04 GMT


On Sun, 5 Oct 1997, 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.

A virtual server's default Port setting is the same as the port on the
first address in the VirtualHost statement... and the port in that address
defaults to the same as the main server's...

So this config:

Port 8080

<VirtualHost 127.0.0.1>
ServerName foo
</VirtualHost>

Behaves "as expected" ... and you can change Port 8080 to whatever else
and get another working config.  This also behaves "as expected":

Port 8080

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
ServerName foo
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName bar
</VirtualHost>

Dean

(I'm speaking in terms of my current code base, although this is mostly
how HEAD currently functions anyhow)


Mime
View raw message