In httpd.conf i have
<Location /~jter>
PerlAccessHandler ApacheAuthentication
PerlSetVar Intranet "65.103.229.188 => joe, 10.10.10.2 => userB"
PerlAuthenHandler ApacheAuthentication
AuthName realm
AuthType Basic
Require valid-user
Order deny,allow
Deny from all
</Location>
And my module is
package ApacheAuthentication;
#use strict;
use Apache::Constants qw(:common);
use Apache::URI;
use Apache::File;
sub handler {
my $r = shift;
# get user's authentication credentials
my ($res, $sent_pw) = $r->get_basic_auth_pw;
return $res if $res != OK;
my $user = $r->connection->user;
# authenticate through DBI
my $reason = authen_dbi($r, $user, $sent_pw);
if ($reason) {
$r->note_basic_auth_failure;
$r->log_reason($reason, $r->uri);
return AUTH_REQUIRED;
}
warn "FINISHED $user $sent_pw";
return OK;
}
It warns to the log file and returns.... But the problem is, why does my browser come
up "forbidden"
Has anybody gotten this to sucessfully work?
Server Version: Apache/1.3.22 (Unix) PHP/4.0.6 mod_perl/1.26 mod_ssl/2.8.5
OpenSSL/0.9.6b
Thanks in advance