Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 71781 invoked from network); 24 Mar 2004 19:29:07 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 24 Mar 2004 19:29:07 -0000 Received: (qmail 97107 invoked by uid 500); 24 Mar 2004 19:28:36 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 97058 invoked by uid 500); 24 Mar 2004 19:28:36 -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: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 96772 invoked from network); 24 Mar 2004 19:28:33 -0000 Received: from unknown (HELO mail.m2n.com) (66.58.11.126) by daedalus.apache.org with SMTP; 24 Mar 2004 19:28:33 -0000 Received: from todd by mail.m2n.com with local (Exim 3.35 #1 (Debian)) id 1B6E07-0007mF-00; Wed, 24 Mar 2004 11:25:19 -0800 Date: Wed, 24 Mar 2004 11:25:19 -0800 To: users@httpd.apache.org Cc: Matthew Williamson Message-ID: <20040324192519.GB28983@m2n.com> References: <1071529803.4869.13.camel@www.linuxserver.com> <1080155428.3348.12.camel@www.linuxserver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1080155428.3348.12.camel@www.linuxserver.com> User-Agent: Mutt/1.3.28i From: Todd Weaver X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: Re: [users@httpd] Virtual Hosts X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Wed, Mar 24, 2004 at 07:10:28PM +0000, Matthew Williamson wrote: > 192.168.0.2 pentium pentium.localdomain localhost > 127.0.0.1 www.reays.com reays.localdomain localhost > 127.0.0.1 www.testbox.com testbox.localdomain localhost > 192.168.0.1 www.linuxbox.com > > Is it that I have something wrong in my hosts file, or should I be > looking at my http.conf to change my virtual host settings? VirtualHosts are sequentially read. And if there is no match for VirtualHosts to distinguish which one you're wanting to use, the first is used. Your example: ServerName pentium.localdomain.com ... ServerName reays.localdomain.com ... ServerName third.localdomain.com ... if you request: http://192.168.0.2/ You will get the first VirtualHost, because httpd cannot distinguish which one you 'really' want. The common distinguishing factor is ServerName. so if you request: http://reays.localdomain.com/ (and have that setup in your hosts properly to point to your httpd server!) You would get the second VirtualHost, since httpd CAN distinguish which one you 'really' wanted. 1. So you most likely need to change your VirtualHosts to include ServerName. 2. You most likely need to change your host file to point to pentium for each ServerName. 3. And you would most likely want to change your request url from IP address based, to named based. Todd. --------------------------------------------------------------------- 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