Practical mod_perl / HTML Version / books


previous page: B.8.2. Apache::MIMEMapper—Associates File Extensions with PerlHandlerspage up: HTML Version of the booknext page: B.9.2. Apache::ProxyPass—implement ProxyPass in Perl

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


Search







modperlbook.org


 HTML Version


 PDF Version


 Download Code


 Table of Contents


 Errata


 mod_perl2 User's Guide


 Sitemap





Add to Google



Creative Commons License


Written by
Eric Cholet (Logilune)
and Stas Bekman (StasoSphere).

Hosted by ibiblio.org.




























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.

 

Continue to:

  • prev: B.8.2. Apache::MIMEMapper—Associates File Extensions with PerlHandlers
  • Table of Contents
  • next: B.9.2. Apache::ProxyPass—implement ProxyPass in Perl

Tags

mod_perl, modperl, Apache, perl, cgi, html, mod_perl, e-commerce, scalability, free, open source, OSS, apache, squid, high availability, modperl, linux, unix, Web, www, mod_perl, webserver, admin, apache, book, webmaster, tools, modperl, guide, docs, documentation, help, mod_perl, perl, information, apache, script, errata, eric cholet, perl, apache, mod-perl, stas bekman, mod_perl, cool, perl, Apache, performance, speed, choice




Other projects to check out: meta-religion.com is for those interested in Religious, Spiritual and Esoteric Phenomena. i-want-a-better.com is a community of people discussing what they would like to be improved in their lives and things they use and interact with. You may also want to find a healer in your area or read articles on variety of topics.






TOP
previous page: B.8.2. Apache::MIMEMapper—Associates File Extensions with PerlHandlerspage up: HTML Version of the booknext page: B.9.2. Apache::ProxyPass—implement ProxyPass in Perl

© 2007 StasoSphere

[ Privacy Policy ] [ Terms of Use ] [ About Authors ] [ Search ]

Last modified Wed May 7 06:27:44 2008