B.9 Trans Handlers

B.9.1 Apache::AddHostPath?Adds Some or All of the Hostname and Port to the URI

This module transforms the requested URI based on the hostname and port number from the HTTP request header. It allows you to manage an arbitrary number of domains and subdomains all pointing to the same document root but for which you want a combination of shared and distinct files.

Essentially the module implements Apache's URI-translation phase by attempting to use some or all of the URL hostname and port number as the base of the URI. It simply does file and directory existence tests on a series of URIs (from most-specific to least-specific) and sets the URI to the most specific match.

For example, if the request is:

URL: http://www.example.org:8080/index.html
URI: /index.html

Apache::AddHostPath would go through the following list of possible paths and set the new URI based on the first match that passes a -f or -d existence test:

$docRoot/org/example/www/8080/index.html
$docRoot/org/example/www/index.html
$docRoot/org/example/index.html
$docRoot/org/index.html
$docRoot/index.html

Available from CPAN. See the module manpage for more information.

B.9.2 Apache::ProxyPass?implement ProxyPass in Perl

This module implements the Apache mod_proxy module in Perl. Based on Apache::ProxyPassThru.

Available from CPAN. See the module manpage for more information.

B.9.3 Apache::ProxyPassThru?Skeleton for Vanilla Proxy

This module uses libwww-perl as its web client, feeding the response back into the Apache API request_rec structure. PerlHandler will be invoked only if the request is a proxy request; otherwise, your normal server configuration will handle the request.

If used with the Apache::DumpHeaders module it lets you view the headers from another site you are accessing.

Available from CPAN. See the module manpage for more information.

B.9.4 Apache::Throttle?Speed-Based Content Negotiation

Apache::Throttle is a package designed to allow Apache web servers to negotiate content based on the speed of the connection. Its primary purpose is to transparently send smaller (lower resolution/quality) images to users with slow Internet connections, but it can also be used for many other purposes.

Available from CPAN. See the module manpage for more information.

B.9.5 Apache::TransLDAP?Trans Handler Example

This module is an example of how you can create a trans handler. This particular example translates from a user's virtual directory on the server to the labeledURI attribute for the given user.

Available from CPAN. See the module manpage for more information.



    Part I: mod_perl Administration
    Part II: mod_perl Performance
    Part VI: Appendixes