httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Gorbenko <ba...@agenstvo.com>
Subject Re[2]: [users@httpd] ServerName directive regular expression
Date Sat, 14 Apr 2007 18:37:58 GMT
megaspaz пишет:
> Serveralias supports * but I'm not sure if it supports the regex you want, but 
> if it's one vhost, then ServerAlias *.some.domain should work for you.
>
> On Saturday 14 April 2007 11:05 am, Dmitriy Gorbenko wrote:
>   
>> Hi all
>>
>> I would like to create a VirtualHost  to process domain names such as
>> [0-9]*.some.domain. Currently, ServerName directive did not support
>> regular expressions, but maybe I can do it by another way ?
>>
>> Thanks.
>>
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> 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
>>     
>
>   
The problem in that I should process domains like [0-9]*.domain.com by 
one way, and domain names like [a-z]{3}.domain.com by another.
This what I need:

<VirtualHost xxx.xxx.xxx.xxx:80>
        ServerName [0-9]*.domain.com
        ProxyRequests Off
        ProxyPass / http://localnet.domain/
        ProxyPassReverse / http://localnet.domain/
        ProxyPreserveHost On
</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx:80>
        ServerName [a-z]{3}.domain.com
        ProxyRequests Off
        ProxyPass / http://another.localnet.domain/
        ProxyPassReverse / http://another.localnet.domain/
        ProxyPreserveHost On
</VirtualHost>

And I did not represent how could I do it.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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


Mime
View raw message