[David, don't forget to hit reply-all]

Thanks. Line continuation!

I now have this in my httpd.conf:

<Location /public>
        PerlAccessHandler 'sub {\
                                return Apache::Const::FORBIDDEN\
                                unless
shift->connection->remote_ip=~m/^\Q10.3.4./;\
                                }'
</Location>

Hmmm.... I'm reading this and it seems to me that this should deny access
to anyone trying to access a file in the /public folder unless they are
coming from a remote address that starts with 10.3.4. But it seems to let
me in coming from 127.0.0.1.

Am I missing something here?

Your code is broken, there is no Apache::Const::FORBIDDEN, but Apache::FORBIDDEN. You also need to compile it before you can use it. Take a look at:
http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlAccessHandler


did you look at the error_log file, was there anything in it?

add 'use warnings/use strict' or PerlOptions -w (and -T) if you don't have already.

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to