Re: Re[2]: ServerName directive regular expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/14/07, Dmitriy Gorbenko <bazil@xxxxxxxxxxxx> wrote:

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.

That's relatively easy. In the first vhost, use something like
ServerAlias 1*.domain.com 2*.domain.com 3*.domain.com ...

If you need something more complicated, then your only choice is
mod_rewrite (or mod_perl, or a custom module).

Joshua.

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux