From owner-freebsd-questions Wed Mar 15 13: 1:48 2000 Delivered-To: freebsd-questions@freebsd.org Received: from hq.ezo.net (hq.ezo.net [206.150.211.190]) by hub.freebsd.org (Postfix) with ESMTP id D184037BADA for ; Wed, 15 Mar 2000 13:01:33 -0800 (PST) (envelope-from jflowers@ezo.net) Received: from zinnia (zinnia.ezo.net [206.150.211.129]) by hq.ezo.net (8.9.3/8.9.3) with SMTP id QAA13199 for ; Wed, 15 Mar 2000 16:05:45 -0500 (EST) (envelope-from jflowers@ezo.net) Message-ID: <004f01bf8ec0$96d4d9a0$81d396ce@ezo.net> From: "Jim Flowers" To: Subject: Apache Virtual Host Setup Confusion Date: Wed, 15 Mar 2000 15:53:59 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In trying to understand the Apache documentation on virtual host setup I have become confused (FreeBSD 3.4-STABLE, apache+php-1.3.12+3.0.15). It seemed to be straightforward enough to set up a main server, a virtual host server and a default server. First I set up the main server with: DNS set up for: ---------------------- host.domain.tld. IN A 222.222.222.222 www.domain.tld IN CNAME host.domain.tld. apache.conf includes main references (outside any container> ---------------------------------------------------------------------------- ServerName host.domain.tld DocumentationRoot /www/domain Browser references to host.domain.tld, www.domain.tld and 222.222.222.222 all display the index.html document in /www/domain. Hooray. Continuing,I add a virtual host for www.domain1.tld DNS ------- www.domain1.tld IN CNAME host.domain.tld. and NameVirtualHost 222.222.222.222 ServerName www.domain1.tld DocumentRoot /www/domain1 Now, browser references to www.domain1.tld, www.domain.tld, host.domain.tld and 222.222.222.222 all bring up the index.html page from /www/domain1. Nothing will show /www/domain documents. Finally I added: DNS ----- bogus.domain.tld IN CNAME host.domain.tld and: DocumentRoot /www/default You guessed it. Nothing changed except now browser references to bogus.domain.tld also display www.domain1.tld documents. This seems to be quite contrary to the Apache vhost documentation. Is it really the way it is supposed to work? You can't have a main server that is independent of the virtual host servers? You can't configure a default server to trap unmatched virtual host servers? I can design workarounds easily enough but this sounds like I have something configured improperly or that I can't read the documentation properly. Any help will be appreciated. Thanks Jim Flowers mailto:jflowers@ezo.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message