Buying Options
Writing Apache Modules with Perl and C
Print $39.95
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £30.50
Add to Cart
What is this?
Description
This guide to web programming shows how to extend the capabilities of the Apache web server. It explains the design of Apache, mod_perl, and the Apache API, then demonstrates how to use them to rewrite CGI scripts, filter HTML documents on the server-side, enhance server log functionality, convert file formats on the fly, and more.
Full Description
Table of Contents
  1. Chapter 1 Server-Side Programming with Apache

    1. Web Programming Then and Now

    2. The Apache Project

    3. The Apache C and Perl APIs

    4. Ideas and Success Stories

  2. Chapter 2 A First Module

    1. Preliminaries

    2. Directory Layout Structure

    3. Installing mod_perl

    4. "Hello World" with the Perl API

    5. "Hello World" with the C API

    6. Instant Modules with Apache::Registry

    7. Troubleshooting Modules

  3. Chapter 3 The Apache Module Architecture and API

    1. How Apache Works

    2. The Apache Life Cycle

    3. The Handler API

    4. Perl API Classes and Data Structures

  4. Chapter 4 Content Handlers

    1. Content Handlers as File Processors

    2. Virtual Documents

    3. Redirection

    4. Processing Input

    5. Apache::Registry

    6. Handling Errors

    7. Chaining Content Handlers

    8. Method Handlers

  5. Chapter 5 Maintaining State

    1. Choosing the Right Technique

    2. Maintaining State in Hidden Fields

    3. Maintaining State with Cookies

    4. Protecting Client-Side Information

    5. Storing State at the Server Side

    6. Storing State Information in SQL Databases

    7. Other Server-Side Techniques

  6. Chapter 6 Authentication and Authorization

    1. Access Control, Authentication, and Authorization

    2. Access Control with mod_perl

    3. Authentication Handlers

    4. Authorization Handlers

    5. Cookie-Based Access Control

    6. Authentication with the Secure Sockets Layer

  7. Chapter 7 Other Request Phases

    1. The Child Initialization and Exit Phases

    2. The Post Read Request Phase

    3. The URI Translation Phase

    4. The Header Parser Phase

    5. Customizing the Type Checking Phase

    6. Customizing the Fixup Phase

    7. The Logging Phase

    8. Registered Cleanups

    9. Handling Proxy Requests

    10. Perl Server-Side Includes

    11. Subclassing the Apache Class

  8. Chapter 8 Customizing the Apache Configuration Process

    1. Simple Configuration with the PerlSetVar Directive

    2. The Apache Configuration Directive API

    3. Configuring Apache with Perl

    4. Documenting Configuration Files

  9. Chapter 9 Perl API Reference Guide

    1. The Apache Request Object

    2. Other Core Perl API Classes

    3. Configuration Classes

    4. The Apache::File Class

    5. Special Global Variables, Subroutines, and Literals

  10. Chapter 10 C API Reference Guide, Part I

    1. Which Header Files to Use?

    2. Major Data Structures

    3. Memory Management and Resource Pools

    4. The Array API

    5. The Table API

    6. Processing Requests

    7. Server Core Routines

  11. Chapter 11 C API Reference Guide, Part II

    1. Implementing Configuration Directives in C

    2. Customizing the Configuration Process

    3. String and URI Manipulation

    4. File and Directory Management

    5. Time and Date Functions

    6. Message Digest Algorithm Functions

    7. User and Group ID Information Routines

    8. Data Mutex Locking

    9. Launching Subprocesses

  1. Appendix A Standard Noncore Modules

    1. The Apache::Registry Class

    2. The Apache::PerlRun Class

    3. The Apache::RegistryLoader Class

    4. The Apache::Resource Class

    5. The Apache::PerlSections Class

    6. The Apache::ReadConfig Class

    7. The Apache::StatINC Class

    8. The Apache::Include Class

    9. The Apache::Status Class

  2. Appendix B Building and Installing mod_perl

    1. Standard Installation

    2. Other Configuration Methods

  3. Appendix C Building Multifule C API Modules

    1. Statistically Linked Modules That Need External Libraries

    2. Dynamically Linked Modules That Need External Libraries

    3. Building Modules from Several Source Files

  4. Appendix D Apache:: Modules Available on CPAN

    1. Content Handling

    2. URI Translation

    3. Perl and HTML Mixing

    4. Authentication and Authorization

    5. Fixup

    6. Logging

    7. Profiling

    8. Persistent Database Connections

    9. Miscellaneous

  5. Appendix E Third-Party C Modules

    1. Content Handling

    2. International Language

    3. Security

    4. Access Control

    5. Authentication and Authorization

    6. Logging

    7. Distributed Authoring

    8. Miscellaneous

  6. Appendix F HTML::Embperl—Embedding Perl Code in HTML

    1. Dynamic Tables

    2. Handling Forms

    3. Storing Persistent Data

    4. Modularization of Embperl Pages

    5. Debugging

    6. Querying a Database

    7. Security

    8. An Extended Example

  7. Colophon

View Full Table of Contents
Product Details
Title:
Writing Apache Modules with Perl and C
By:
Doug MacEachern, Lincoln Stein
Publisher:
O'Reilly Media
Formats:
  • Print
  • Safari Books Online
Print Release:
April 1999
Pages:
752
Print ISBN:
978-1-56592-567-0
| ISBN 10:
1-56592-567-X
Customer Reviews
About the Authors
  1. Doug MacEachern

    Doug MacEachern has been addicted to Perl and web servers since early 1994 when he was introduced to Plexus as a student employee at the University of Arizona. Soon after returning to his home town of Boston, Massachusetts, and entering the "real world," he discovered the Apache web server, and since early 1996, he has been gluing Perl into all its nooks and crannies. His day job has consisted of integrating various other technologies with the Web, including DCE, Kerberos, and GSSAPI, but Perl has been the only one he cannot let go of. Doug has continued as a developer disguised as a consultant since the start of 1998, spending most of his time between Auckland, New Zealand, and San Francisco, California, with time at home in Boston during the warmer months. Doug likes to spend his time away from software--far, far away, sailing on the ocean, diving below it, or simply looking at it from a warm, sandy beach where technology doesn't go much beyond thatched huts and blenders.

    View Doug MacEachern's full profile page.

  2. Lincoln Stein

    Lincoln Stein is an assistant investigator at Cold Spring Harbor Laboratory, where he develops databases and user interfaces for the Human Genome Project using the Apache server and its module API. He is the author of several books about programming for the Web, including The Official Guide to CGI.pm, How to Set Up and Maintain a Web Site, and Web Security: A Step-by-Step Reference Guide.

    View Lincoln Stein's full profile page.

Colophon

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal featured on the cover of Writing Apache Modules with Perl and C is a white-tailed eagle. These large sea eagles have a very large range and are therefore highly adaptable. They are mostly found in coastal areas, but can also be found in the tundra and steppes, forests, and mountains. They build huge nests in trees, bushes, cliffs, or on the ground, depending on what their environment offers. Eagles fall into the category of bird known as "raptors," a category that also includes falcons and hawks. Like other sea eagles, white-tailed eagles have toes adapted to grasping smooth prey such as fish. Their excellent vision enables all eagles to spot prey from the air or a high perch. They frequently hunt in pairs for their favorite meal of diving birds. Keeping a sharp eye on the bird as it dives, the white-tailed eagle grabs it as soon as it resurfaces. Fish is another staple of the white-tailed eagle's diet. In fact, their diet is as adaptable as everything else about these birds. They will frequently eat fish in summer and waterfowl and carrion in winter, when fish are less plentiful. Eagles often eat their victims while still flying, breaking them apart and discarding the nonedible parts to lighten their load. Eagles, like most raptors, often dine on sick or wounded animals. There are more than 50 species of eagle spread throughout the world, with the exception of New Zealand and Antarctica. A pair of eagles will use the same nest year after year, lining it with green leaves and grass, fur, turf, or other soft materials and adding to it each year. The largest eagle nest ever found was 20 feet deep and 10 feet across. White-tailed eagles are highly regarded, even revered, by many native populations of Siberia and Scandinavian fishermen. However, in other areas overhunting has almost led to their extinction. Increased awareness and limits on hunting have helped this majestic bird rebuild its population, and it is now considered to be safe. Melanie Wang was the production editor and copy editor for this book, and Sheryl Avruch was the production manager. Sarah Jane Shangraw, Nicole Arigo, and Mary Anne Weeks Mayo provided quality control reviews. Betty Hugh and Sebastian Banker provided production support. Robert Romano created the illustrations using Adobe Photoshop 4 and Macromedia FreeHand 7. Mike Sierra provided FrameMaker technical support. Seth Maislin wrote the index. Edie Freedman designed the cover of this book, using a 19th-century engraving from the Dover Pictorial Archive. The cover layout was produced by Kathleen Wilson with QuarXPress 3.32 using the ITC Garamond font. The quick reference card was designed and produced by Kathleen Wilson. The inside layout was designed by Alicia Cech and implemented in FrameMaker 5.5 by Mike Sierra. The text and heading fonts are ITC Garamond Light and Garamond Book. This colophon was written by Clairemarie Fisher O'Leary.

  • Book cover of Writing Apache Modules with Perl and C