[Tue Mar 23 12:04:58 2004] [error] access to /LOGIN failed, reason: Apache::AuthCookieDBI: didn't have the secret key for auth realm JBG
[Tue Mar 23 12:04:58 2004] [error] access to /logintest failed, reason: Apache::AuthCookieDBI: didn't the secret key from for auth realm JBG
The host in question is a VirtualHost. My first configuration attempt, which matches one of the more common solutions ( putting the PerlSetVar directive before the module load ) doesn't do the trick:
<VirtualHost xx.xx.xx.xx>
ServerName host.domain.com
[DocRoot and Logging Directives]
## these directives are for Apache::AuthCookieDBI ## and MUST COME FIRST
PerlSetVar JBGDBI_SecretKeyFile /home/httpd/secure.jbgoodwin.com/keyfile
PerlModule Apache::AuthCookieDBI PerlSetVar JBGPath / PerlSetVar JBGLoginScript /login.pl
[ other PerlSetVar directives ]
## the two location directives:
## These documents require user to be logged in.
<Location /logintest>
AuthType Apache::AuthCookieDBI
AuthName JBG
PerlAuthenHandler Apache::AuthCookieDBI->authenticate
PerlAuthzHandler Apache::AuthCookieDBI->authorize
require valid-user
</Location>
#
##this is the action of the login.pl script above. <Location /LOGIN> AuthType Apache::AuthCookieDBI AuthName JBG SetHandler perl-script PerlHandler Apache::AuthCookieDBI->login </Location> </VirtualHost>
The handler gets called. I've double-checked everything, and now the SecretKeyFile is being wonky. I've read through the code, read through the docs, googled for an answer, even tried setting the SecretKey directive in the main server config (not in the VH config).
Permissions look OK:
[hostname ....] $ ls -al keyfile -rw------- 1 nobody nobody 52 Mar 1 11:22 keyfile
I have to be missing something obvious?
The earlier problem I was having, if anyone was interested, got solved. The problem was mod_auth looking first, the Apache::AuthCookie trying to kick in ...
--brian
-- 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