httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <Martin.Krae...@mch.sni.de>
Subject Re: Draft: vhosts-in-depth and vhost-examples
Date Wed, 29 Oct 1997 20:26:44 GMT
On Wed, Oct 29, 1997 at 03:09:57AM +0100, Lars Eilebrecht wrote:
> ok, here we go for a _first_ draft for the new vhosts-in-depth document
> and a new vhost-example document containing some common (and maybe
> uncommon ;-)) examples.

Very good, Lars! I always missed an examples document!

>        
> Examples
> 
>      * IP-based vhosts only
>      * Name-based vhosts only
>      * Mixed name-/IP-based vhosts
>      * Port-based vhosts
>        
>      * Using a _default_ vhosts
	       ^-delete
       * Using _default_ vhosts

...
>      _________________________________________________________________
>    
>   IP-based vhosts only
>   
...
>        Server configuration:
>        
>     ...
>     Port 80

      Listen 80     <------- Add "Listen" to every "Port"?

...
>      The main server can never catch a request, because all IP address
>      of our machine are in use for IP-based virtual hosts.

How about "localhost"? It will be served by the supposedly unreachable
main server. Shouldn't the examples include _default_s or at least a pointer
to it?

>      _________________________________________________________________
>    
>   Port-based vhosts
...
>     Listen 80
>     Listen 8080

Is it really true that Port based vhosts don't need a NameVirtualHost?
That was always unclear to me.

....

>      vhost with a wildcard port) catches all requests that where sent to
							     ^^^^^were

>      an unspecified IP address. The main server is never used to serve a
>      request.
> 
....

>               An In-Depth Discussion of Virtual Host Matching
>                                       
....
>     Absolute URI
>     
>    The URI from the request is check if it is an absolute URI, that is it
				 ^^^^^ed...
>    includes http://hostname/, then an attempt is made to determine if the
>    hostname's address (and optional port) match that of the connection vhost

How about something along the lines of:

If the request is an absolute URI, and its hostname and port match the main
server or one of the configured virtual hosts, then the scheme/hostname/port
prefix is stripped of and the remaining relative URI is served by the
corresponding vhost. (If no configured main/virtual server matches the given
hostname and port, the request is taken to be a proxy request.)
If the request contained a relative URI, a similar search is made for the
value of the Host: header field.

...
>   Tips
>   
>      * Avoid ServerPaths which are prefixes of other ServerPaths. If you
>        cannot avoid this then you have to ensure that the longer (more
>        specific) prefix vhost appears earlier in the configuration file
>        than the shorter (less specific) prefix (i.e., "ServerPath /abc"
>        should appear after "ServerPath /abcdef").
					 ^^^^^^^
I never tried this, but from looking at the code it appears to me that this
should read "ServerPath /abc/def"

Just my $.02

    Martin
-- 
| S I E M E N S |  <Martin.Kraemer@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Mime
View raw message