I'm running into a similiar issue, and I from what I've read,
mod_vhost_alias looks like it could help:
http://httpd.apache.org/docs/mod/mod_vhost_alias.html

Any comments on this mod?

Brian B.

----- Original Message ----- 
From: Jonathan Hilgeman <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 8:35 PM
Subject: <Perl> Sections in Apache Config


> Hi,
> I've been trying to do this for some time but can't figure out how.
> Basically I want a setup where anyone at www.UserName.domain.com or
> UserName.domain.com will have their DocumentRoot set to
> /www/httpd/html/UserName. So far I've tried this:
> 
> <VirtualHost 111.111.111.111>
> UseCanonicalName Off
> <Perl>
> 
> if($HTTP_HOST =~ s/(?:www\.)?(.*)\.domain\.com//g)
> {
> $VirtualDocumentRoot = "/www/httpd/html/$1";
> }
> else
> {
> $VirtualDocumentRoot = '/www/httpd/html/%-3';
> }
> 
> 1;
> 
> </Perl>
> 
> </VirtualHost>
> 
> The second $VirtualDocumentRoot line works fine, but I NEED to be able to
> get the first line to work instead, using <Perl> if possible.
> 
> Any guesses?
> 
> Jonathan

Reply via email to