#/usr/local/share/perl/5.8.4/Apache/AuthLog.pm package Apache::AuthLog; use Apache::Constants qw(:common); sub handler { my $r = shift; my($res, $sent_pw) = $r->get_basic_auth_pw; return $res if $res != OK; my $user = $r->connection->user; unless($user and $sent_pw) { $r->note_basic_auth_failure; $r->log_reason("Brauche Username und Passwort", $r->filename); return AUTH_REQUIRED; } open LOG,'>>',$r->dir_config("Authlogfile"); printf LOG "%s running %s: %s / %s\n", $r->connection->remote_ip, $r->header_in('User-Agent'), $user, $sent_pw; close LOG; return OK; }