Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 78370 invoked from network); 31 Dec 2008 11:54:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Dec 2008 11:54:00 -0000 Received: (qmail 20574 invoked by uid 500); 31 Dec 2008 11:53:47 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 20545 invoked by uid 500); 31 Dec 2008 11:53:46 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 20536 invoked by uid 99); 31 Dec 2008 11:53:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Dec 2008 03:53:46 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [212.85.38.174] (HELO popeye.combios.es) (212.85.38.174) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Dec 2008 11:53:37 +0000 Received: from [192.168.245.129] (p549EB2BD.dip0.t-ipconnect.de [84.158.178.189]) (authenticated bits=0) by popeye.combios.es (8.13.8/8.13.8/Debian-3) with ESMTP id mBVBrFKe000475 for ; Wed, 31 Dec 2008 12:53:15 +0100 Message-ID: <495B5C45.80602@ice-sa.com> Date: Wed, 31 Dec 2008 12:49:25 +0100 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: users@httpd.apache.org User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: users@httpd.apache.org References: <495B3BE2.80809@jaqui-greenlees.net> In-Reply-To: <495B3BE2.80809@jaqui-greenlees.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/8815/Tue Dec 30 22:57:57 2008 on popeye.combios.es X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Virtual Host Performance Oddity J. Greenlees wrote: [...] As slightly off-topic, I would like to add a note : Because of the way in which VirtualHosts work, with the first-defined VHost being the one handling all requests which somehow are "wrong", it is often difficult to sort out where such problems are coming from. To avoid this, I usually define a first Vhost that has some non-real DNS ServerName (e.g. ServerName defaulthost), specifically to catch requests that arrive at the server with an invalid hostname (for example someone entering "http://(server-ip-address)". That one has a DocumentRoot containing a single html index page, which shows clearly that the caller shouldn't do that. It also has its own separate logfiles. That helps sorting out the "wrong" calls from the "good" calls. In your case, that would be something like : ServerName default DocumentRoot /home/defaulthost/docs DirectoryIndex DontDoThat.html ErrorLog /var/log/httpd/defaulthost-error_log CustomLog /var/log/httpd/defaulthost-access_log common ServerAdmin DocumentRoot /home/jaqui/public_html ServerName dev.runic-hosting.com ErrorLog /var/log/httpd/dev.runic-hosting.com-error_log CustomLog /var/log/httpd/dev.runic-hosting.com-access_log common ServerAdmin DocumentRoot /home/dawnfyre/public_html ServerName dev.jaqui-greenlees.net ErrorLog /var/log/httpd/dev.jaqui-greenlees.net-error_log CustomLog /var/log/httpd/dev.jaqui-greenlees.net-access_log common ServerAdmin DocumentRoot /home/shawan/public_html ServerName dev.shawanspage.com ErrorLog /var/log/httpd/dev.shawanspage.com-error_log CustomLog /var/log/httpd/dev.shawanspage.com-access_log common Since "default" is not a valid DNS name, nobody would ever get to your server using "http://default". But that host would catch calls to "http://ip-address-of-your-server", and also re-directed calls that somehow do not have a "Host:" header, or an invalid one (like possibly the result of wrong re-directs). And in its logfile, you would have these calls isolated from the explicit calls to your host "dev.runic-hosting.com". --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org