| |
- Module initialization
(directives: PerlModule,
PerlRequire)
Called once in the parent server, during startup
and restarts. This is where the interpreter object
is constructed.
- Reading the configuration
file (directive:
<Perl>...</Perl>)
Called by the parent server during startup and
restarts to read the server configuration files.
Also called when .htaccess files are found at
request time.
- Child initialization
(directive: PerlChildInitHandler)
Called when a new Apache process has been
launched.
- Post read request
(directive:
PerlPostReadRequestHandler)
Called after the client request has been read, but
before any other processing has been performed.
Here's where you can examine HTTP headers and
change them before Apache gets a crack at
them.
- URI translation
(directive: PerlTransHandler)
Called to perform the translation between the
virtual URI and the physical filename. For example,
you can use this to override the way that Apache
translates URIs into paths in the document root, or
to perform fancy string mappings.
- Header parsing
(directive: PerlHeaderParserHandler)
Now that the URI has been mapped to a resource, the
module is given another chance to look at the
request. Here it can decide if the request
structure needs to be modified in some way or
terminated altogether before the server performs
resource-intensive tasks.
- Access control
(directive: PerlAccessHandler)
When a URL is under access control (access
restriction that does not require user
authentication such as a password),
PerlAccessHandler() is called. This lets
you contrive your own restrictions for a directory,
such as restricting access based on the day of the
week or phase of the moon.
- Authentication
(directive: PerlAuthenHandler)
When invoked, this phase determines whether the
user is who he says he is (by username and
password).
- Authorization (directive:
PerlAuthzHandler)
This phase decides whether the user is permitted to
access this particular URI.
- MIME type mapping
(directive: PerlTypeHandler)
This phase maps URIs to MIME types. You can use
this to override Apache's default file extension to
MIME type mappings. For example, you could look the
MIME type up in a database, or infer it from the
file's "magic number."
- Miscellaneous fixups
(directive: PerlFixupHandler)
This phase is invoked just before content
generation so that modules can "fixup" the request
now that it knows exactly who will handle the
response. For example, this is where mod_env
prepares the SetEnv and PassEnv
configuration directives that show up in Perl's
%ENV.
- Content generation
(directive: PerlHandler)
This is where you create HTML pages, redirections,
or any other type of HTTP response. This is the
most frequently handled phase of the
transaction.
- Logging (directive:
PerlLogHandler)
Called after all the other phases to log the
results. You can use this to customize Apache's log
format, or to change logging completely. For
example, you can compute summary statistics and
store them to a relational database.
- Registered cleanups
(directive: PerlCleanupHandler)
Modules may register functions to be called after
the client connection has been closed and just
before the various request resources are cleaned
up.
- Child exit (directive:
PerlChildExitHandler)
Called just before an Apache process
terminates.
|
|