From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GVJow-000159-6y for garchives@archives.gentoo.org; Thu, 05 Oct 2006 03:22:50 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k953MHim022580; Thu, 5 Oct 2006 03:22:17 GMT Received: from mail.chipin.com (mail.chipin.com [209.85.46.150]) by robin.gentoo.org (8.13.8/8.13.6) with ESMTP id k953KViB013099 for ; Thu, 5 Oct 2006 03:20:31 GMT Received: from [10.10.1.227] (unknown [167.216.11.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.chipin.com (Postfix) with ESMTP id 86BE3AB80ED for ; Wed, 4 Oct 2006 21:43:26 -0500 (CDT) Message-ID: <452479EF.1020309@munat.com> Date: Wed, 04 Oct 2006 17:20:15 -1000 From: Ben Munat User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-server@gentoo.org Reply-to: gentoo-server@lists.gentoo.org MIME-Version: 1.0 To: gentoo-server@lists.gentoo.org Subject: Re: [gentoo-server] apache config question References: <45220F93.5070207@munat.com> <45246A5C.9000207@gentoo.org> In-Reply-To: <45246A5C.9000207@gentoo.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 18dc81b8-372b-44e3-9800-244d11be094a X-Archives-Hash: 7ee7da935b49598497bf938bd5eb8514 Hah... didn't think you could put a * in the ServerAlias... haven't found any documentation to that effect. But I'll try this. And Nicholas, I haven't had a chance to try your solution yet, but I appreciate it. Thanks to everyone who tried to help. I can probably get one of these to work. b Michael Stewart (vericgar) wrote: > Ben Munat wrote: >> Hello. Does anyone know how I can configure apache 2.0.x to map all >> requests to a given subdomain to a give directory regardless of the rest >> of the server name? >> >> Doing this for my webmail setup... so mail.foo.com, mail.bar.com, >> mail.baz.com, etc. should all map to my squirrelmail directory. >> >> I've been doing this by adding virtual host directives for the mail >> subdomain for every domain I add but it seems like there should be an >> easier way. I figure I can probably do it with mod_rewrite but I'm no >> wizard with that. >> >> thanks, >> >> b > > If I understand you right, you want mail.* to point to say /var/www/mail > , while letting other domains/subdomains point to their own places. > > Here's how I handle it on my server: > > > ServerName mail.your-domain.com > ServerAlias mail.* > DocumentRoot /var/www/mail > [... other configuration as needed ...] > > > This needs to be one of the first virtual hosts that apache reads so > that it matches mail.* before it matches say *.blahblah.com (if you are > hosting blahblah.com) > -- gentoo-server@gentoo.org mailing list