Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 62429 invoked from network); 8 Dec 2010 19:11:12 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Dec 2010 19:11:12 -0000 Received: (qmail 91562 invoked by uid 500); 8 Dec 2010 19:11:12 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 91509 invoked by uid 500); 8 Dec 2010 19:11:12 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 91495 invoked by uid 99); 8 Dec 2010 19:11:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Dec 2010 19:11:11 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@glewis.com designates 66.51.199.93 as permitted sender) Received: from [66.51.199.93] (HELO mail4.dslextreme.com) (66.51.199.93) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 08 Dec 2010 19:11:02 +0000 Received: (qmail 9620 invoked from network); 8 Dec 2010 19:10:40 -0000 Received: from unknown (HELO glsnet.net) (72.25.108.115) by mail4.dslextreme.com with SMTP (d89e3b10-02fe-11e0-84f1-000c29c6406d); Wed, 08 Dec 2010 11:10:40 -0800 Received: from [10.0.0.8] by glsnet.net with SMTP (EHLO [10.0.0.8]) (ArGoSoft Mail Server Pro for WinNT/2000/XP, Version 1.8 (1.8.9.5)); Wed, 8 Dec 2010 11:07:18 -0800 Message-ID: <4CFFD82C.2000102@glewis.com> Date: Wed, 08 Dec 2010 11:10:36 -0800 From: "Gregg L. Smith" User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: ditch NameVirtualHost directive? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ArGoMail-Authenticated: gregg@glsnet.net X-MagicMail-UUID: d89e3b10-02fe-11e0-84f1-000c29c6406d X-MagicMail-MUA: d89e3b10-02fe-11e0-84f1-000c29c6406d 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. >