Apache-SessionManager
view release on metacpan or search on metacpan
SessionManager/cookpod.pod view on Meta::CPAN
<Location /protected>
PerlSetVar SessionManagerTracking On
PerlSetVar SessionManagerExpire 3600
PerlSetVar SessionManagerInactivity 1800
PerlSetVar SessionManagerName SESSIONID
PerlSetVar SessionManagerStore File
PerlSetVar SessionManagerStoreArgs "Directory => /tmp/apache_session_data/"
<Perl>
use lib '/usr/local/apache/perl/';
</Perl>
PerlAuthenHandler Apache::MyAuth
AuthName "Reserved Club"
AuthType Basic
require valid-user
PerlSetVar MyAuthLogin /protected/login.html
</Location>
We have added a C<PerlSetvar> directive in order to set C<MyAuthLogin> variable
with login form URI.
SessionManager/cookpod.pod view on Meta::CPAN
PerlHeaderParserHandler Apache::SessionManager
PerlSetVar SessionManagerTracking On
PerlSetVar SessionManagerExpire 3600
PerlSetVar SessionManagerInactivity 1800
PerlSetVar SessionManagerName SESSIONID
PerlSetVar SessionManagerStore File
PerlSetVar SessionManagerStoreArgs "Directory => /tmp/apache_session_data/"
<Perl>
use lib '/usr/local/apache/perl/';
</Perl>
PerlAuthenHandler Apache::MyAuth
AuthName "Reserved Club"
AuthType Basic
require valid-user
PerlSetVar MyAuthLogin /protected/login.html
</FilesMatch>
The only difference is that you cannot use C<Location> directive (I used
C<FilesMatch>) and you must install
SessionManager/cookpod.pod view on Meta::CPAN
L<Apache::SessionManager|Apache::SessionManager> in C<Header parsing> phase of
Apache request instead of C<URI translation> phase. Moreover, it is possible to
use only cookies for the session tracking.
This is an example of how configure F<.htaccess> file for use session (using
file system as backend datastore) with CGI scripts under
L<Apache::Registry|Apache::Registry>:
<IfModule mod_perl.c>
<Perl>
use lib '/path/to/your/perl-lib/lib/site_perl',
'/path/to/your/perl-lib/lib/'; # for Storable.pm
</Perl>
PerlModule Apache::SessionManager
<FilesMatch "\.cgi$">
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
PerlSetupEnv On
Options ExecCGI
PerlHeaderParserHandler Apache::SessionManager
( run in 0.341 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )