Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 28524 invoked by uid 500); 13 Dec 2001 02:15:37 -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 28512 invoked from network); 13 Dec 2001 02:15:37 -0000 Received: from sc-sville-24-197-113-28.chartersc.net (HELO rhino.thrillseeker.net) (24.197.113.28) by daedalus.apache.org with SMTP; 13 Dec 2001 02:15:37 -0000 Received: from localhost (localhost [127.0.0.1]) by rhino.thrillseeker.net (8.12.1/8.12.1/Debian -3) with ESMTP id fBD2FfiD003312 for ; Wed, 12 Dec 2001 21:15:41 -0500 Subject: Re: Named Based Virtual servers From: Billy Harvey To: users@httpd.apache.org In-Reply-To: <5.1.0.14.2.20011212210129.00a8dbf0@oddprocess.org> References: <5.1.0.14.2.20011212210129.00a8dbf0@oddprocess.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0 (Preview Release) Date: 12 Dec 2001 21:15:40 -0500 Message-Id: <1008209741.715.14.camel@rhino.thrillseeker.net> Mime-Version: 1.0 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wed, 2001-12-12 at 21:04, Matthew Daubenspeck wrote: > I am using a bunch of name based virtual servers with Apache and Debain. > All of my domains are in the format of: > > name.com with a DNS CNAME of www.name.com pointing to name.com > > I am using named virtual servers for the www.name.com's and it works great. > However, if any of the plain old name.com address is used, the first server > in httpd.conf is served. > > Do I have to add an entry for all of the named possibilities, or is there a > way to reject any other names except for the ones listed in httpd.conf. > > That sounds confusing as hell, but I can't think of another way to phrase it... Matthew - I think you're asking how to serve a default page if someone comes to the raw IP address? Since I constantly have people probing my IP address (virus weenies), I created an entry for the first named host that would redirect them away: NameVirtualHost * ServerName google.com ServerAdmin webmaster@rhinocomputing.com DocumentRoot /var/www/default ServerAlias google.com *.google.com and in that directory I have some files that are useful: default.ida index.php robots.txt default.ida has some php code in it: and index.php has: to give those search engines that ignore the robots file something to index. The robots file has: User-agent: * Disallow: / So, if someone probes my IP address instead of any of my virtual domains, hopefully they will get nothing and be redirected away. Billy --------------------------------------------------------------------- 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 For additional commands, e-mail: users-help@httpd.apache.org