Re: ditch NameVirtualHost directive?
On 08/12/2010 18:07, Eric Covener wrote: ... and assume overlaps are intentional opt-in to name-based vhosts? The selection algorithm would not change, meaning you'd still only be selecting from the best ip-based match. We'd lose the warning about overlapping vhosts, and maybe incur some overhead on mapping a vhost that was unintentionally showing up multiple times. Just kicking the idea around since NVH seems to be tough for users to grok. +1 ! And this somehow raises a cousin one into my mind. While we are fixing vhosts, how about : https://issues.apache.org/bugzilla/show_bug.cgi?id=50436
Re: ditch NameVirtualHost directive?
On 12/8/2010 11:07 AM, Eric Covener wrote: > ... and assume overlaps are intentional opt-in to name-based vhosts? > > The selection algorithm would not change, meaning you'd still only be > selecting from the best ip-based match. > > We'd lose the warning about overlapping vhosts, and maybe incur some > overhead on mapping a vhost that was unintentionally showing up > multiple times. > > Just kicking the idea around since NVH seems to be tough for users to grok. Just worked through this with a support tech today :) Absolutely +1. The optimization to skip NVH traversal is trivial; is vhost->next NULL?
Re: ditch NameVirtualHost directive?
Hi, Seems to me what users have the most problem groking is the duplicate of the main host in httpd.conf and it needing to be the first vhost. In the docs it is highlighted as "Main server goes away." In reality, this is not always the case, sometimes people just get the main host and nothing else. There is not a month that goes by on the Apache Lounge forum that this does not get requests for help. It's explained on there many times but most seem incapable of using the search function. The docs are misleading cause right after they see the warning, which they do not understand in most cases, the example doesn't show it. How is a noob supposed to know that this is in reality the same hostname/docroot et al from httpd.conf or whatever the name of the file is on whatever flavor of OS; NameVirtualHost *:80 ServerName www.domain.tld ServerAlias domain.tld *.domain.tld DocumentRoot /www/domain I see how it is explained and I understand it clearly, but I've been tinkering with Apache since 1.3.0 before that warning was ever added to the docs. I also can not think of any better to way to explain it other than literally showing it in in example. If in your httpd.conf file you have; ServerName bla.bla ... DocumentRoot /path/to/bla then in your virtual host file you need; NameVirtualHost *:80 # Duplicate of our main host is needed so that virtual hosting # works as it is supposed to ServerName bla.bla DocumentRoot /path/to/bla # Now we can add all other hosts below ServerName foo.foo DocumentRoot /path/to/foo ... ServerName bar.bar DocumentRoot /path/to/bar ... Just my two cents since you brought the subject up :) Cheers, Gregg Eric Covener wrote: ... and assume overlaps are intentional opt-in to name-based vhosts? The selection algorithm would not change, meaning you'd still only be selecting from the best ip-based match. We'd lose the warning about overlapping vhosts, and maybe incur some overhead on mapping a vhost that was unintentionally showing up multiple times. Just kicking the idea around since NVH seems to be tough for users to grok.
Re: ditch NameVirtualHost directive?
On Wed, Dec 8, 2010 at 12:07 PM, Eric Covener wrote: > ... and assume overlaps are intentional opt-in to name-based vhosts? > > The selection algorithm would not change, meaning you'd still only be > selecting from the best ip-based match. > > We'd lose the warning about overlapping vhosts, and maybe incur some > overhead on mapping a vhost that was unintentionally showing up > multiple times. > > Just kicking the idea around since NVH seems to be tough for users to grok. +1. Makes sense. -- Dan Poirier
Re: ditch NameVirtualHost directive?
On Dec 8, 2010, at 12:07 PM, Eric Covener wrote: ... and assume overlaps are intentional opt-in to name-based vhosts? The selection algorithm would not change, meaning you'd still only be selecting from the best ip-based match. We'd lose the warning about overlapping vhosts, and maybe incur some overhead on mapping a vhost that was unintentionally showing up multiple times. Just kicking the idea around since NVH seems to be tough for users to grok. +1 to the concept. Virtual hosts are (based on user questions) too hard to understand, and I think we could improve that situation by making the configuration smarter. -- Rich Bowen rbo...@rcbowen.com