|
List Info
Thread: ServerName directive regular expression
|
|
| ServerName directive regular expression |

|
2007-04-14 13:05:51 |
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://htt
pd.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
|
|
| Re: ServerName directive regular
expression |
  United States |
2007-04-14 13:27:23 |
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://htt
pd.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
--
If there's anything more important than my ego around, I
want it
caught and shot now...
------------------------------------------------------------
---------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://htt
pd.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
|
|
| Re ServerName directive regular
expression |

|
2007-04-14 13:37:58 |
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://htt
pd.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].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].domain.com
ProxyRequests Off
ProxyPass / http://another.localn
et.domain/
ProxyPassReverse / http://another.localn
et.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://htt
pd.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
|
|
| Re: Re ServerName directive regular
expression |

|
2007-04-14 13:52:38 |
On 4/14/07, Dmitriy Gorbenko <bazil agenstvo.com> wrote:
>
> The problem in that I should process domains like
[0-9]*.domain.com by
> one way, and domain names like [a-z].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].domain.com
> ProxyRequests Off
> ProxyPass / http://another.localn
et.domain/
> ProxyPassReverse / http://another.localn
et.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://htt
pd.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
|
|
| Re: Re ServerName directive regular
expression |

|
2007-04-14 13:53:40 |
On 4/14/07, Joshua Slive <joshua slive.ca> wrote:
> That's relatively easy. In the first vhost, use
something like
> ServerAlias 1*.domain.com 2*.domain.com 3*.domain.com
...
I forgot to say, you'll also need to reorder the two
<VirtualHost>
sections, because requests that don't match any
ServerName/ServerAlias
directive are served by the first listed
<VirtualHost>.
Joshua.
------------------------------------------------------------
---------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://htt
pd.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
|
|
| Re: ServerName directive regular
expression |

|
2007-04-14 13:50:26 |
Joshua Slive пишет:
> On 4/14/07, Joshua Slive <joshua slive.ca> wrote:
>
>> That's relatively easy. In the first vhost, use
something like
>> ServerAlias 1*.domain.com 2*.domain.com
3*.domain.com ...
>
> I forgot to say, you'll also need to reorder the two
<VirtualHost>
> sections, because requests that don't match any
ServerName/ServerAlias
> directive are served by the first listed
<VirtualHost>.
>
> Joshua.
>
>
------------------------------------------------------------
---------
> The official User-To-User support forum of the Apache
HTTP Server
> Project.
> See <URL:http://htt
pd.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
>
>
Yes, I know it, but thank for support )
And thank for suggestion about
ServerAlias 1*.domain.com 2*.domain.com 3*.domain.com ...
Dmitriy.
------------------------------------------------------------
---------
The official User-To-User support forum of the Apache HTTP
Server Project.
See <URL:http://htt
pd.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
|
|
[1-6]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|