NAME
mod_perl Server Configuration
Description
FIXME: DESCRIPTION
mod_perl configuration directives
Installing handlers
- PerlChildInitHandler
- PerlOpenLogsHandler
- PerlPostConfigHandler
- PerlPreConnectionHandler
- PerlProcessConnectionHandler
- PerlHeaderParserHandler
- PerlAccessHandler
- PerlAuthenHandler
- PerlAuthzHandler
- PerlTypeHandler
- PerlFixupHandler
- PerlOutputFilterHandler
- PerlResponseHandler
- PerlLogHandler
- PerlPostReadRequestHandler
- PerlInitHandler
- PerlTransHandler
General directives
- PerlSwitches switches
-
pass switches to the Perl command line. For example, to enable warnings:
PerlSwitches -w
- PerlTrace [level]
-
set the trace level. This directive is enabled when mod_perl is compiled with the MP_TRACE option.
level
is either:all
which sets maximum logging and debugging levels;
a combination of one or more option letters (or option numerical equivalents) from the following list:
d ( 1) directive processing f ( 2) filters g ( 4) Perl runtime interaction h ( 8) handlers i ( 16) interpreter pool management m ( 32) memory allocations s ( 64) perl sections t (128) benchmark-ish timings
When
level
is not specified, the tracing level will be set to the value of the MOD_PERL_TRACE environment variable.
Threaded mode directives
These directives are enabled only in a threaded mod_perl+Apache combo.
- PerlInterpStart
-
Number of Perl interpreters to start
- PerlInterpMax
-
Max number of running Perl interpreters
- PerlInterpMaxSpare
-
Max number of spare Perl interpreters
- PerlInterpMinSpare
-
Min number of spare Perl interpreters
- PerlInterpMaxRequests
-
Max number of requests per Perl interpreters
- PerlInterpScope
-
Scope for which selected interpreter should be held, one of: request, connection, handler, subrequest.
The default is request.
PerlOptions Directive
Enable/Disable Options. Options include:
- Parent
-
Create a new parent Perl interpreter for the given VirtualHost and give it its own interpreter pool (implies Clone).
- Clone
-
Share the parent Perl interpreter, but give the VirtualHost its own interpreter pool.
Use:
PerlSwitches +inherit
to inherit base Perl interpreter's
PerlSwitches
. - Enable
-
On by default, used to disable mod_perl for a given VirtualHost.
- Perl*Handler
-
Disable Perl*Handlers, all compiled in handlers are enabled by default.
- AutoLoad
-
Resolve Perl*Handlers at startup time, includes loading the module from disk if not already loaded.
- GlobalRequest
-
Setup the global request_rec for use with Apache->request
- ParseHeaders
-
Scan output for HTTP headers, same functionality as 1.x's PerlSendHeaders, but more robust.
- MergeHandlers
-
Turn on merging of Perl*Handler arrays, example:
PerlFixupHandler One::fixup <Location /foo> PerlFixupHandler Another::fixup </Location>
By default, a request for /foo only runs Another::fixup (1.x behavior) PerlOptions +MergeHandlers (inside Location /foo) will run both One::fixup and Another::fixup.
Examples:
# disable mod_perl for this host
<VirtualHost ...>
PerlOptions -Enable
</VirtualHost>
# create 2 Parent Perls,
# each pointing to a different developer library tree
<VirtualHost ...>
ServerName dev1
PerlOptions +Parent
PerlSwitches -Mblib=/home/dev1/lib/perl
</VirtualHost>
<VirtualHost ...>
ServerName dev2
PerlOptions +Parent
PerlSwitches -Mblib=/home/dev2/lib/perl
</VirtualHost>
# give VirtualHost its own interpreter pool
<VirtualHost ...>
PerlOptions +Clone
PerlInterpStart 2
PerlInterpMax 2
</VirtualHost>
# disable handlers
<VirtualHost ...>
PerlOptions -Authen -Authz -Access
</VirtualHost>
Retrieving Server Startup Options
The httpd server startup options can retrieved using Apache::exists_config_define()
. For example this checks whether the server has been started in a single mode:
if (Apache::exists_config_define("ONE_PROCESS")) {
print "Running in a single mode";
}
Maintainers
Maintainer is the person(s) you should contact with updates, corrections and patches.
Doug MacEachern <dougm (at) covalent.net>
Authors
Doug MacEachern <dougm (at) covalent.net>
Only the major authors are listed above. For contributors see the Changes file.