#PerlOpmask default

=pod

=head1 NAME

mod_perl test configuration file

=head1 DESCRIPTION

umm, we use this to test mod_perl

=over to apache

 #-Tw
 PerlTaintCheck On
 PerlWarn On
 PerlFreshRestart On

=back to pod

=over 4

=item Test that mod_perl skips this

=back

=cut

<Directory />
AllowOverride None
</Directory>
<Directory /usr/local/src/mod_perl-1.31-rc2/t>
AllowOverride All
</Directory>

#make sure all regex stuff works
#BrowserMatch Mozilla/2 nokeepalive

#PerlPassEnv PERL5LIB PERL5OPT

#PerlPostReadRequestHandler Apache::StatINC
#PerlRestartHandler Apache::Symbol
#PerlFreshRestart On
PerlSetVar UndefOnReload On

#Configuration directives specific to mod_perl
ServerRoot /usr/local/src/mod_perl-1.31-rc2/t
User nobody
Group wheel
Port 8529
ServerName localhost
DocumentRoot /usr/local/src/mod_perl-1.31-rc2/t/docs

#mod_perl stuff


PerlPassEnv TERM EDITOR NOCHANCE USER PERL5LIB
PerlSetEnv KeyForPerlSetEnv OK
PerlSetVar KeyForPerlSetVar OK
 
PerlRequire docs/startup.pl
PerlRequire docs/stacked.pl

=pod
<Perl>
    push @INC, map { "t/TestDirectives/blib/$_" } qw(arch lib);
    require Apache::TestDirectives;
</Perl>
TestCmd one two
=cut

#we do this to test that `PerlSendHeader Off' will work
<Files ~ "\.pl$">
   PerlHandler          Apache::Registry
   PerlSendHeader       On
   Options              +ExecCGI
</Files>

Alias /perl/ /usr/local/src/mod_perl-1.31-rc2/t/net/perl/
Alias /lexinfo/ /usr/local/src/mod_perl-1.31-rc2/t/net/perl/
Alias /perl_xs/ /usr/local/src/mod_perl-1.31-rc2/t/net/perl/
Alias /dirty-perl/ /usr/local/src/mod_perl-1.31-rc2/t/net/perl/
Alias /ng-perl/ /usr/local/src/mod_perl-1.31-rc2/t/net/perl/

Alias /cgi-bin/ /usr/local/src/mod_perl-1.31-rc2/t/net/perl/

<Location /dirmagic>
PerlHandler -My::DirIndex
</Location>

<Location /perl>
ErrorDocument 500 /perl/server_error.pl
SetHandler perl-script
PerlHandler Apache::Registry::handler
Options +ExecCGI
PerlSendHeader       Off
</Location>

<Location /lexinfo>
SetHandler perl-script
PerlHandler Apache::RegistryLexInfo->handler
Options +ExecCGI
PerlSendHeader       Off
</Location>

<Location /perl_xs>
ErrorDocument 500 /perl_xs/server_error.pl
SetHandler perl-script
PerlHandler Apache::RegistryXS
Options +ExecCGI
PerlSendHeader       Off
</Location>

<Location /dirty-perl>
Options +ExecCGI
SetHandler perl-script
PerlHandler Apache::PerlRun
PerlSendHeader On
</Location>

<Location /ng-perl>
Options +ExecCGI
SetHandler perl-script
PerlHandler Apache::RegistryNG
PerlSendHeader On
</Location>

<Location /perl/noenv>
SetHandler perl-script
PerlHandler Apache::Registry::handler
Options +ExecCGI
PerlSendHeader       Off
PerlSetupEnv Off
</Location>

<Location /perl_xs/noenv>
SetHandler perl-script
PerlHandler Apache::RegistryXS
Options +ExecCGI
PerlSendHeader       Off
PerlSetupEnv Off
</Location>

<Location /cgi-bin>
SetHandler cgi-script
Options +ExecCGI
</Location>

<Location /perl/io>
SetHandler perl-script
PerlHandler Apache::Registry::handler
Options +ExecCGI
PerlSendHeader On
PerlSetupEnv   On
</Location>

<Location /perl_xs/io>
SetHandler perl-script
PerlHandler Apache::RegistryXS
Options +ExecCGI
PerlSendHeader On
PerlSetupEnv   On
</Location>

<Location /perl/perl-status>
PerlSetVar StatusOptionsAll On
SetHandler perl-script
PerlHandler +Apache::Status
PerlSetEnv PERL5LIB /home/dougm/lib/perl
</Location>

<Location /perl_xs/perl-status>
PerlSetVar StatusPeek On
PerlSetVar StatusGraph On
PerlSetVar StatusDumper On
SetHandler perl-script
PerlHandler Apache::Status
</Location>

#PerlSetEnv PERL_RLIMIT_CPU 25
#PerlChildInitHandler Apache::Resource

#PerlChildInitHandler My::child_init
#PerlChildExitHandler My::child_exit

#end mod_perl stuff

ErrorLog logs/error_log
PidFile logs/httpd.pid
ResourceConfig conf/srm.conf
#mod_ssl has a problem with /dev/null
TypesConfig conf/dev-null

AddType text/x-server-parsed-html .shtml
AddType text/html .html

AddType text/perl-module .pm
Action text/perl-module /perl/action.pl

#PerlModule Apache::Registry
#PerlModule Apache::Safe

#<Location /perl>
#Options ExecCGI
#SetHandler perl-script
#PerlHandler Apache::Registry::handler
#PerlDispatchHandler Apache::Safe::handler
#</Location>

#protect mod_include #perl's 
#<Files *.shtml>
#PerlDispatchHandler Apache::Safe::handler
#</Files>

#test some other modules if available
<Location /subr>
SetHandler perl-script
PerlHandler Apache::Sandwich
PerlSetVar HEADER /test.html
PerlSetVar FOOTER "/perl/cgi.pl?PARAM=1 /perl/io/perlio.pl"
</Location>

<Location /STAGE>

ErrorDocument 403 /stage-redir
ErrorDocument 404 /stage-redir

</Location>

#Andreas' Apache::Sandwich
<Location /stage-redir>
# the name of this location must match the ErrorDocument redirects
# above

# PerlSetVar apache_stage_regex " ^ (/STAGE/[^/]*) (.*) $ "

# This regex has to split a staged URI into two parts. It is
# evaluated with the /ox switch in effect, so this will NOT be a
# per-directory variable. The first part will be thrown away and
# just the second part will be served if the original URI cannot
# be accessed. In case of 301 and 302 redirects the first part
# will be prepended again. The default regex is defined as above
# which means that URIS will be split into "/STAGE/anyuser" and
# the rest.

SetHandler perl-script
PerlHandler Apache::Stage
Options +ExecCGI

</Location>

#Apache::ePerl
<Files ~ ".+\.iphtml$">
    Options     +ExecCGI
    SetHandler  perl-script
    PerlHandler Apache::ePerl
</Files>

AddType text/html .ehtml
#HTML::Embperl
<Files *.ehtml>
    SetHandler perl-script
    PerlHandler HTML::Embperl
    Options +ExecCGI  
</Files>

#Apache::EP
<Files *.ep>
    SetHandler perl-script
    #PerlFixupHandler "sub { $INC{'DBI.pm'} ||= 1; require Apache::EP; }"
    PerlHandler Apache::EP->handler
    Options +ExecCGI
</Files>

<IfModule apache_ssl.c>
SSLDisable
SSLCacheServerPath /tmp
SSLCacheServerPort /tmp/gcache_port
</IfModule>

<IfModule mod_ssl.c>
SSLEngine Off
SSLSessionCache none

SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
#SSLLog      logs/ssl_engine_log
#SSLLogLevel info
</IfModule>

<Location /status>
SetHandler server-status
</Location>

<Location /info>
SetHandler server-info
</Location>

<Location /manual/mod>
SetHandler perl-script
PerlHandler Apache::ModuleDoc
</Location>

<Location /object>
SetHandler perl-script
PerlHandler $My::Obj->method
</Location>

<Location /death>
PerlHandler Apache::Death
SetHandler perl-script
</Location>

#libapreq
#LoadModule testapreq_module modules/libtestapreq.so
<Location /apreq-form-test>   
SetHandler apreq-form  
</Location>   
<Location /apreq-upload-test>   
SetHandler apreq-upload 
</Location>   
<Location /apreq-cookie-test>   
SetHandler apreq-cookie 
</Location>   
LockFile logs/mod_perl.lock
PerlChildInitHandler My::child_init
PerlChildExitHandler My::child_exit
<Location /chain>
SetHandler perl-script
PerlHandler Stacked::one Stacked::two Stacked::three Stacked::four
</Location>

