David Arnold wrote:
Stas,
Here's a little report to answer your questions below about my error_log:
With:
PerlAccessHandler 'sub {\
return Apache::Const::FORBIDDEN\
unless
shift->connection->remote_ip=~m/^\Q10.3.4./;\
David Arnold wrote:
Stas et al,
OK. Gave this a try:
file:MyApache/BlockByIP.pm
--
package MyApache::BlockByIP;
use strict;
use warnings;
use Apache::RequestRec ();
use Apache::Connection ();
use Apache::Const -compile => qw(FORBIDDEN OK);
my %
Stas et al,
OK. Gave this a try:
file:MyApache/BlockByIP.pm
--
package MyApache::BlockByIP;
use strict;
use warnings;
use Apache::RequestRec ();
use Apache::Connection ();
use Apache::Const -compile => qw(FORBIDDEN OK);
my %bad_ips = map {$_
Stas,
Here's a little report to answer your questions below about my error_log:
With:
PerlAccessHandler 'sub {\
return Apache::Const::FORBIDDEN\
unless
shift->connection->remote_ip=~m/^\Q10.3.4./;\
[David, don't forget to hit reply-all]
Thanks. Line continuation!
I now have this in my httpd.conf:
PerlAccessHandler 'sub {\
return Apache::Const::FORBIDDEN\
unless
shift->connection->remote_ip=~m/^\Q10.3.4./;\
David Arnold wrote:
All,
Tried this in my httpd.conf:
PerlAccessHandler 'sub {
return Apache::Constants::FORBIDDEN
unless
shift->connection->remote_ip=~m/^\Q10.3.4./;
}'
But got this error when