HTML-Mason-ApacheHandler2
view release on metacpan or search on metacpan
eg/httpd-mason-simple.conf view on Meta::CPAN
PerlModule Apache::Log
PerlModule Apache::URI
PerlModule Apache::Session
PerlModule APR::Table
PerlModule ModPerl::Registry
PerlModule Apache::Const
PerlModule APR::Const
PerlModule ModPerl::Const
Alias /perl/ /usr/local/test/httpd/perl/
<Location /perl/>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
</Location>
PerlTransHandler +MyApache::Redirect
PerlSetVar Redirect verbose
PerlAddVar Redirect 0
PerlSetVar RedirectPort "^test-"
PerlAddVar RedirectPort 12984
PerlModule MyApache::HappyFunBall
<Location /happyfunball>
SetHandler modperl
PerlResponseHandler MyApache::HappyFunBall
</Location>
PerlModule MyApache::Dump
<Location /get>
SetHandler modperl
PerlResponseHandler MyApache::Dump
</Location>
<Location /post>
SetHandler modperl
PerlResponseHandler MyApache::Dump
</Location>
#-------------------mason------------------------------------
PerlSetVar _MasonUser wwwrun
PerlSetVar _MasonGroup nogroup
PerlSetVar _MasonDefaultDocumentRoot "/usr/local/test/httpd/htdocs"
PerlSetVar BC_MasonLint 5
<Perl>
{
package HTML::Mason::Commands;
use Apache::Const -compile => ':common';
use APR::Const -compile => ':common';
use ModPerl::Const -compile => ':common';
use Apache::Session;
use MasonX::Request::WithApacheSession2;
use DBI;
use Data::Dumper;
use Image::Magick;
use Date::Format;
use Net::IP::CMatch;
use HTML::Lint;
}
</Perl>
### Section 4: Virtual Hosts
Listen 12984
NameVirtualHost localhost:12984
# for general testing - default - on localhost
# site: bctest
<VirtualHost localhost:12984>
ServerName bctest.beaucox.com
DocumentRoot "/usr/local/test/httpd/htdocs/bctest"
PerlSetVar MasonCompRoot /usr/local/test/httpd/htdocs/bctest
PerlSetVar MasonDataDir /usr/local/test/httpd/mason/bctest
PerlSetVar MasonRequestClass MasonX::Request::WithApacheSession2
PerlSetVar MasonSessionAllowInvalidId yes
PerlSetVar MasonSessionCookieName beaucox-bctest-cookie
PerlSetVar MasonSessionCookieDomain .beaucox.com
PerlSetVar MasonSessionCookieExpires +7d
PerlSetVar MasonSessionClass Apache::Session::MySQL
PerlSetVar MasonSessionDataSource dbi:mysql:bctest_sessions
PerlSetVar MasonSessionUserName mysql
PerlSetVar MasonSessionPassword mysql
PerlSetVar MasonSessionLockDataSource dbi:mysql:bctest_sessions
PerlSetVar MasonSessionLockUserName mysql
PerlSetVar MasonSessionLockPassword mysql
PerlSetVar MasonSessionUseCookie yes
<FilesMatch "^_">
SetHandler perl-script
PerlResponseHandler HTML::Mason::ApacheHandler2
</FilesMatch>
<Directory "/usr/local/test/httpd/htdocs/bctest">
<FilesMatch "\.html$|\.htm$">
SetHandler perl-script
PerlResponseHandler HTML::Mason::ApacheHandler2
</FilesMatch>
</Directory>
</VirtualHost>
# site: masontest
<VirtualHost localhost:12984>
ServerName masontest.beaucox.com
DocumentRoot "/usr/local/test/httpd/htdocs/masontest"
PerlSetVar MasonCompRoot /usr/local/test/httpd/htdocs/masontest
PerlSetVar MasonDataDir /usr/local/test/httpd/mason/masontest
PerlSetVar MasonRequestClass MasonX::Request::WithApacheSession2
PerlSetVar MasonSessionAllowInvalidId yes
PerlSetVar MasonSessionCookieName beaucox-masontest-cookie
PerlSetVar MasonSessionCookieDomain .beaucox.com
PerlSetVar MasonSessionCookieExpires +7d
PerlSetVar MasonSessionClass Apache::Session::MySQL
PerlSetVar MasonSessionDataSource dbi:mysql:masontest_sessions
PerlSetVar MasonSessionUserName mysql
PerlSetVar MasonSessionPassword mysql
( run in 2.015 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )