MrCBofBCinTX
Technical User
I need to have three different locations on my site that have different cookies using Apache::AuthCookie.
I have had no trouble getting it to work well using the example form mod_perl cookbook, but now that I have added two new locations, I am getting the wrong cookie after a login attempt and thus no access. Not sure where the problem is at. Here is a section from my httpd.conf:
When I try to login to the other two, I get a cookie for CUSTOMER_AREA-PRIVATE
trying to login to customer area does work just fine.
I have had no trouble getting it to work well using the example form mod_perl cookbook, but now that I have added two new locations, I am getting the wrong cookie after a login attempt and thus no access. Not sure where the problem is at. Here is a section from my httpd.conf:
Code:
<Location /customer>
AuthType Cookbook::Authenticate
AuthName CUSTOMER_AREA-PRIVATE
PerlAuthenHandler Cookbook::Authenticate->authenticate
Require valid-user
Options +IncludesNoExec +MultiViews
SSLRequireSSL
</Location>
PerlModule Cookbook::Authenticate
PerlSetVar PGDB-PRIVATEPath /
PerlSetVar PGDB-PRIVATELoginScript /perl/login.pl
PerlSetVar PGDB-PRIVATEExpires +1h
PerlSetVar PGDB-PRIVATESessionTimeout +15m
PerlSetVar VPCP-DATABASE-PRIVATELoginScript /perl/login.pl
PerlSetVar VPCP-DATABASE-PRIVATEPath /
PerlSetVar VPCP-DATABASE-PRIVATEExpires +1h
PerlSetVar VPCP-DATABASE-PRIVATESessionTimeout +15m
PerlSetVar CUSTOMER_AREA-PRIVATEPath /
PerlSetVar CUSTOMER_AREA-PRIVATELoginScript /perl/login.pl
PerlSetVar CUSTOMER_AREA-PRIVATEExpires +1h
PerlSetVar CUSTOMER_AREA-PRIVATESessionTimeout +55m
<Location /login>
AuthType Cookbook::Authenticate
AuthName PGDB-PRIVATE
SetHandler perl-script
PerlHandler Cookbook::Authenticate->login
</Location>
<Location /logoff>
AuthType Cookbook::Authenticate
AuthName CUSTOMER_AREA-PRIVATE
SetHandler perl-script
PerlHandler Cookbook::Authenticate->logout
</Location>
# These documents require user to be logged in.
<Location /pgdb>
AuthType Cookbook::Authenticate
AuthName PGDB-PRIVATE
PerlAuthenHandler Cookbook::Authenticate->authenticate
Require valid-user
Options +IncludesNoExec +MultiViews
SSLRequireSSL
</Location>
<Location /login>
AuthType Cookbook::Authenticate
AuthName VPCP-DATABASE-PRIVATE
SetHandler perl-script
PerlHandler Cookbook::Authenticate->login
</Location>
<Location /login>
AuthType Cookbook::Authenticate
AuthName CUSTOMER_AREA-PRIVATE
SetHandler perl-script
PerlHandler Cookbook::Authenticate->login
</Location>
<Location /logout>
AuthType Cookbook::Authenticate
AuthName VPCP-DATABASE-PRIVATE
SetHandler perl-script
PerlHandler Cookbook::Authenticate->logout
</Location>
<Location /perl/VPCP>
SetHandler perl-script
PerlHandler Apache::Registry::handler
Options ExecCGI +SymLinksIfOwnerMatch
PerlSetupEnv Off
AuthType Cookbook::Authenticate
AuthName VPCP-DATABASE-PRIVATE
PerlAuthenHandler Cookbook::Authenticate->authenticate
Require valid-user
SSLRequireSSL
</Location>
When I try to login to the other two, I get a cookie for CUSTOMER_AREA-PRIVATE
trying to login to customer area does work just fine.