home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Writing Apache Modules with Perl and C
By:   Lincoln Stein and Doug MacEachern
Published:   O'Reilly & Associates, Inc.  - March 1999

Copyright © 1999 by O'Reilly & Associates, Inc.


 


   Show Contents   Previous Page   Next Page

Appendix D - Apache:: Modules Available on CPAN

In this section...

Introduction
Content Handling
URI Translation
Perl and HTML Mixing
Authentication and Authorization
Fixup
Logging
Profiling
Persistent Database Connections
Miscellaneous

Introduction

   Show Contents   Go to Top   Previous Page   Next Page

In This Appendix

There are many modules available from CPAN for use with Apache and mod_perl. Some are "drop-in" modules which you simply install, configure, and run with the server. Others are modules that are used by other Apache modules. In this section we will list the modules which are currently available, along with a brief description. You will find all of these modules from your local CPAN mirror at http://www.perl.com/CPAN/modules/by-module/Apache/.

Other modules which might not be available yet are listed in the Apache/Perl module list, which is at http://www.perl.com/CPAN/modules/by-module/Apache/apache-modlist.html.

In this appendix we only give terse descriptions of each module just to give you an idea of what the many generous and talented authors have decided to share with us. Please consult each module's documentation for more details.

Content Handling

   Show Contents   Go to Top   Previous Page   Next Page

Apache::Album

Apache::Album sets up a virtual set of photo albums, creating thumbnail images on the fly using Image::Magick. The dynamic layout of the album allows you to configure captions, background, table borders, footers, and more.

Author

Jim Woodgate, woody@bga.com

Apache::Gateway

Apache::Gateway implements a gateway based on the HTTP 1.1 draft definition of a gateway:

[a] server which acts as an intermediary for some other server. Unlike a proxy, a gateway receives requests as if it were the origin server for the requested resource; the requesting client may not be aware that it is communicating with a gateway.

Besides the standard gateway features, Apache::Gateway also implements the following:

  • Automatic failover with mirrored instances
  • Multiplexing
  • Pattern-dependent gatewaying
  • FTP directory gatewaying
  • Timestamp correction

Author

Charles C. Fu, ccwf@bacchus.com

Apache::GzipChain

Apache::GzipChain compresses the output from other Perl handlers on the fly. This is done only if the browser understands gzip encoding. To determine this, Apache::GzipChain will check both the browser's Accept-Encoding header and User-Agent header

Author

Andreas Koenig, koenig@kulturbox.de

Apache::Layer

Apache::Layer provides a handler to layer multiple content trees on top of each other. It is most useful for web sites where a high proportion of the site content is common.

Author

Simon Matthews, sam@peritas.com

Apache::Filter

Apache::Filter has similar goals as Apache::OutputChain, allowing modules to filter the output of each other.

Author

Ken Williams, ken@forum.swarthmore.edu

Apache::OutputChain

Apache::OutputChain provides a mechanism for chaining Perl content response handlers. This allows you to make filter modules that take output from previous handlers, make some modifications, and pass the output to the next handler or to a browser.

Author

Jan Pazdziora, adelton@fi.muni.cz

Apache::PrettyText

Apache::PrettyText will dynamically format files of type text/plain, so output always looks "pretty" by the time it reaches the browser window.

Author

Chris Thorman, chris@thorman.com

Apache::ProxyPass

Apache::ProxyPass implements mod_proxy ProxyPass functionality that is configurable on a per-directory basis, rather than a per-server basis.

Author

Michael Smith, mjs@iii.co.uk

Apache::RandomLocation

Apache::RandomLocation can be configured to serve a random URI selected from a list for the given location. This can come in quite handy for slinging advertising banners and multiplexing requests.

Authors

Matthew Darwin, matthew@davin.ottawa.on.ca

Randy Kobes, randy@theory.uwinnipeg.ca

Apache::RedirectDBI

Apache::RedirectDBI redirects requests to different directories based on the existence of a user in one or more database tables.

Author

Michael Smith, mjs@iii.co.uk

Apache::Sandwich

Apache::Sandwich provides a mechanism for adding headers and footers to documents on the fly, creating a document "sandwich." It does so using the subrequest mechanism, so there is no document parsing overhead involved, as there is with SSI documents.

Authors

Doug MacEachern, dougm@pobox.com

Vivek Khera, vivek@khera.org

Apache::Stage

A staging area is a place where an author of an HTML document can check the look and feel of a document before it is "published." Apache::Stage provides such a place that requires a minimum amount of space. It doesn't require separate servers, a mirror of the "real" tree, or even a tree of symbolic links, just a sparse directory to hold the documents being modified.

Author

Andreas Koenig, koenig@kulturbox.de

Apache::AutoIndex

This module is a subclassable Perl version of the mod_dir and mod_autoindex directory indexer modules.

Author

Philippe M. Chiasson, gozer@ectoplasm.dyndns.com

URI Translation

   Show Contents   Go to Top   Previous Page   Next Page

Apache::TimedRedirect

Apache::TimedRedirect will redirect configured URIs to another URI if the request happens within a given time period. It is intended to politely redirect visitors from a site that is undergoing some form of maintenance, such as database-driven areas of a site when the databases are being refreshed.

Author

Peter G. Marshall, mitd@mitd.com

Apache::TransLDAP

Apache::TransLDAP can be configured to translate requests for user directories by mapping to an LDAP database entry.

Author s

Clayton Donley, donley@wwa.com

Perl and HTML Mixing

   Show Contents   Go to Top   Previous Page   Next Page

Apache::ASP

Apache::ASP provides an Active Server Pages port to Apache. Active Server Pages is a web application platform that originated with Microsoft's IIS server. Under Apache for both Win32 and Unix, it allows a developer to create web applications with session management and Perl embedded in static HTML files.

Author

Joshua Chamas, chamas@alumni.stanford.org

Apache::Embperl

See Appendix F.

Apache::EmbperlChain

Apache::EmbperlChain hooks with the Apache::OutputChain module to process the output of modules as HTML::Embperl documents.

Author

Eric Cholet, cholet@logilune.com

Apache::EP

HTML::EP is a system for embedding Perl into HTML and ships with an Apache::EP module which provides a handler for mod_perl. It includes session support, database handling, basic localization, and some examples such as Unix user administration and a web shop.

Author

Jochen Wiedmann, joe@ispsoft.de

Apache::ePerl

ePerl interprets HTML files interspersed with Perl code--one of the very first of its kind.

Author

Ralf S. Engelschall, rse@engelschall.com

Apache::Mason

HTML::Mason allows web pages and sites to be constructed from shared, reusable building blocks called components. Components contain a mix of Perl and HTML and can call each other and pass values back and forth like subroutines. Common design elements (headers, footers, etc.) need be changed only once to affect the whole site. Mason has component/data caching facilities, as well as several debugging features: requests can be replayed from the command line and the Perl debugger, and a web-based previewer shows how each piece of a page is generated.

Author

Jonathan Swartz, swartz@transbay.net

Apache::SSI

Apache::SSI implements the functionality of mod_include in Perl. Apache::SSI can be subclassed to implement new SSI directives or to modify the behavior of existing ones. In addition, the output of Apache::SSI can be hooked into Apache::Filter or Apache::OutputChain for further processing.

Author

Ken Williams, ken@forum.swarthmore.edu

Apache::Taco

Apache::Taco provides a template-driven system for generating web pages with dynamic content. The package comes complete with an Apache::Taco module for use with mod_perl.

Author

Ken Williams, ken@forum.swarthmore.edu

   Show Contents   Go to Top   Previous Page   Next Page
Copyright © 1999 by O'Reilly & Associates, Inc.