httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean T Allen <s...@usaherbals.com>
Subject Re: [users@httpd] Apache config directives based on requestor ip address?
Date Fri, 10 Dec 2004 17:30:12 GMT
mod_rewrite can be used to accomplish what you want in spirit if not in 
the design you
have below.


Andrew Boyce-Lewis wrote:

>I am looking for a way to apply alternative configuration directives to
>apache based on the source ip address. Basically, I was to do something
>like this:
>
><VirtualHost *>
>        ServerName test.example.com
>	<RequesterMatch 10.0.0.42>
>		DocumentRoot /var/web/root/a
>	<RequesterMatch>
>	<RequesterMatch !10.0.0.42>
>		DocumentRoot /var/web/root/b
>	<RequesterMatch>
></VirtualHost>
>
>Obviously the RequesterMatch directive does not exist. Has anyone solved
>this problem in the past? I can think of a number of somewhat ugly ways
>to solve this problem using iptables, but an elegant solution would be
>best. 
>
>Any ideas and/or experience with such problems?
>
>Thanks,
>	-Andrew
>
>  
>


Mime
View raw message