MESSAGE
DATE | 2014-09-15 |
FROM | Ruben Safir
|
SUBJECT | Subject: [NYLXS - HANGOUT] [ruben@mrbrklyn.com: lost directory indexes]
|
----- Forwarded message from Ruben Safir -----
Date: Mon, 15 Sep 2014 00:22:26 -0400 From: Ruben Safir To: modperl-at-perl.apache.org, richter-at-ecos.de CC: "mrbrklyn-at-panix.com >> Ruben Safir" Subject: lost directory indexes User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0
I added a perl handler to my apache setup and I can't understand why I'm losing the directory listings in my image and doc directories. I need to both squelch rougue web querries
The apache conf looks like this:
ServerAdmin ruben-at-mrbrklyn.com DocumentRoot "/usr/local/apache/htdocs/brooklyn" ServerName brooklyn-living.com DirectoryIndex index.html PerlModule Embperl Embperl_UseEnv on ErrorLog logs/brooklyn_error_log CustomLog logs/brooklyn_access_log common Options Indexes ExecCGI DirectoryIndex index.html SetHandler perl-script PerlResponseHandler URL_BLOCK PerlHandler Embperl AllowOverride None Order allow,deny Allow from all Options Indexes FollowSymLinks SetHandler perl-script PerlResponseHandler URL_BLOCK
and the URL_BLOCK script looks like this: package URL_BLOCK;
use strict; use Apache2::RequestRec (); use Apache2::RequestIO (); use Apache2::Const -compile => qw(:common);
sub handler{ my $r = shift; my $gate = $r->unparsed_uri; print STDERR "YO $gate\n"; return Apache2::Const::DECLINED unless defined $gate; if ($gate =~ m{///}){ print STDERR "I have a match\n"; $r->log_reason("Access Forbidden", $r->filename); return Apache2::Const::FORBIDDEN; } return Apache2::Const::DECLINED;
}
1;
----- End forwarded message -----
|
|