perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Pang" <rww...@gmail.com>
Subject Re: add httpd.conf directive
Date Mon, 17 Sep 2007 09:20:49 GMT
2007/9/17, André Warnier <aw@ice-sa.com>:

>
> If the above is not applicable, then you could use something like
> <location /xyz>
>    PerlSetVar AllowedIps "ip1 ip2 ip3"
>    ...
> </location>
>
> and in your module do
>
> sub handler {
>    my $r = shift; # the request object
>    my $AllowedIps = $r->dir_config('AllowedIps') || ''; # get "ip1 ip2 ip3"
>    ...
> }

Also you can add them in httpd.conf,

    PerlAddVar PassAuthIPs 11.11.11.11
    PerlAddVar PassAuthIPs 22.22.22.22
    PerlAddVar PassAuthIPs 33.33.33.33

and in modperl handler,

    @pass_ips = $r->dir_config->get('PassAuthIPs');

this would get the IPs you set with PassAuthIPs in httpd.conf.

Mime
View raw message