Apache-SiteControl

 view release on metacpan or  search on metacpan

sample/apache_sitecontrol.conf  view on Meta::CPAN

<Directory /home/tkay/src/site_control/sample>
   Order allow,deny
   Allow from all
</Directory>

Alias /sample /home/tkay/src/site_control/sample
PerlAddVar MasonCompRoot  "sample => /home/tkay/src/site_control/sample"

PerlModule Apache::SiteControl

# This require is not needed if you installed Apache::SiteControl in your
# system paths
PerlRequire "/home/tkay/src/site_control/sample/apache_modperlinit.pl"


# Directory of protected stuff...the login page should go in /sample
<Location /sample/site>
   # Set up the method of credential verification. See SimpleAuth.pm in this
   # directory, or Apache::SiteControl for help on making your own.
   PerlSetVar SiteControlMethod SimpleAuth

   # Turn on debugging
   PerlSetVar SiteControlDebug 1

   # Configure the factories. See Apache::SiteControl::UserFactory and
   # Apache::SiteControl::ManagerFactory
   PerlSetVar SiteControlManagerFactory MyPermissionFactory

   # Configure the location of the session data on server disks
   PerlSetVar SiteControlSessions /tmp/sample_sessions
   PerlSetVar SiteControlLocks /tmp/sample_sessions/locks

   # Choose a name for the instance of the authenticator. This name is
   # used as part of the remaining variable names.
   PerlSetVar AuthName sample

   # Set the path that will be protected
   PerlSetVar samplePath /sample

   # Indicate the path to the login page. Be careful, HTML::Mason can 
   # interfere with proper handling...make sure you know your dependencies.
   # See samples and Apache::AuthCookie for more information.
   PerlSetVar sampleLoginScript /sample/samplelogin.pl

   # See Apache::AuthCookie for descriptions of these.
   PerlSetVar sampleSatisfy All
   PerlSetVar sampleDomain .uoregon.edu
   PerlSetVar sampleCache 1
   PerlSetVar sampleExpires +2h

   SetHandler perl-script
   PerlHandler HTML::Mason::ApacheHandler

   AuthType Apache::SiteControl
   AuthName sample

   # Tell mod_perl that you want this module to control access:
   PerlAuthenHandler Apache::SiteControl->authenticate
   PerlAuthzHandler Apache::SiteControl->authorize

   require valid-user
</Location>

<FilesMatch "\.pl$">
   SetHandler perl-script
   PerlHandler Apache::Registry
   Options +ExecCGI
</FilesMatch>

<Location /sample/SampleLogin>
   # Set up the method of credential verification. See SimpleAuth.pm in this
   # directory, or Apache::SiteControl for help on making your own.
   PerlSetVar SiteControlMethod SimpleAuth

   # Turn on debugging
   PerlSetVar SiteControlDebug 1

   # Configure the factories. See Apache::SiteControl::UserFactory and
   # Apache::SiteControl::ManagerFactory
   PerlSetVar SiteControlManagerFactory MyPermissionFactory

   # Configure the location of the session data on server disks
   PerlSetVar SiteControlSessions /tmp/sample_sessions
   PerlSetVar SiteControlLocks /tmp/sample_sessions/locks

   # Choose a name for the instance of the authenticator. This name is
   # used as part of the remaining variable names.
   PerlSetVar AuthName sample

   # Set the path that will be protected
   PerlSetVar samplePath /sample

   # Indicate the path to the login page. Be careful, HTML::Mason can 
   # interfere with proper handling...make sure you know your dependencies.
   # See samples and Apache::AuthCookie for more information.
   PerlSetVar sampleLoginScript /sample/samplelogin.pl

   # See Apache::AuthCookie for descriptions of these.
   PerlSetVar sampleSatisfy All
   PerlSetVar sampleDomain .uoregon.edu
   PerlSetVar sampleCache 1
   PerlSetVar sampleExpires +2h

   AuthType Apache::SiteControl
   AuthName sample
   SetHandler perl-script
   PerlHandler Apache::SiteControl->login
</Location>



( run in 0.882 second using v1.01-cache-2.11-cpan-39bf76dae61 )