httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Rodent of Unusual Size)
Subject Name/address virtual hosts
Date Sat, 27 Sep 1997 21:11:02 GMT
    Having finally gotten some additional iron and addresses (thanks and
    kudos to my CEO!), I'm trying to get a real handle on understanding
    some of the vhost issues.  Dean's been complaining about them, and
    providing fixes, and holding forth on the subject for months, but
    much of it went right over my head, and I didn't have resources to
    delve deeper.  Now I do, and I think I'm beginning to see why he
    gibbers so. <g>

    As I recall, there are limitations on how name-vhosts and
    address-vhosts can be intermixed, but I can't find clear
    documentation on the restrictions.  I tried snooping through the
    online docs, but they don't describe the 1.3 matching algorithm yet.

    I'm getting results I don't understand.  I'm working with two
    addresses and five names: -> A -> B
                 C -> A
    		 D -> B
    		 E -> B

    I have the following in my configuration files:

     ServerName localhost (for the main server)

    I have name-based <VirtualHost> containers for all of these (none
    are listed by IP address), with ServerName and ServerAlias in each
    set to the name of the vhost.  And here's what I get:

     http://A/ -> DocumentRoot from <VirtualHost A>
     http://B/ -> DocumentRoot from <VirtualHost B>
     http://C/ -> DocumentRoot from <VirtualHost B>
     http://D/ -> DocumentRoot from <VirtualHost B>
     http://E/ -> DocumentRoot from <VirtualHost A>

    This changes if I alter the order of the <VirtualHost> containers.

    Clearly the name-vhosts aren't even in the running.  There is
    obviously some basic flaw in my understanding which has heretofore
    been concealed by my working strictly with name-vhosts.  Yarg..

    Leaving the additional dimensions (e.g., port numbers) out of it,
    what I would have *expected* to happen was something along the lines

     1. Does rlookup("Host:") == IP of interface request arrived on?
         NO: [a] use _default_ vhost for that address, or for whole server
	     if no per-address _default_ defined
    	 YES: goto [2]

     2. Is there a <VirtualHost> that matches "Host:"?
         NO: go to [a]
    	 YES: use it

    I feel as though there is a crucial linchpin piece missing from the
    algorithm - like maybe not being able to specify a per-address
    _default_ container..?  Maybe the linchpin is missing from my

    #ken    P-P}

View raw message