5.1 Apache Architecture

   

Before examining how Oracle has extended the Apache server for use in Oracle Application Server, you need to take some time to learn about Apache's basic architecture. The Apache architecture (prefork model) consists of a parent process that starts one or more child processes (Unix) or threads (Windows). The child processes each serve a single request at a time. When a child process finishes serving a request, it once again becomes available to serve another request.

A child process manages a request through its life cycle. The request life cycle can be broken down into phases. Each request is taken through the life cycle phases until the request is completed, or until an error occurs. Figure 5-1 shows the Apache request life cycle. Apache functionality is provided by modules that are plugged into an appropriate phase of the request life cycle.

Figure 5-1. The Apache request life cycle
figs/oas_0501.gif

Modules are typically plugged in using an AddHandler or SetHandler directive within a URL mapping directive in the Apache configuration file httpd.conf . A module has hooks in the form of callback methods that are implemented for the desired phase of the life cycle. The URL directive activates the handler based on a particular characteristic of a request's URI.

At the end of each request, Apache logs the request URI to an access log file. A different access log can be created for each URL mapping directive you specify in the configuration file. In addition, you can customize the format with directives or replace the logging mechanism altogether with the appropriate directive. If an error occurs, the error is logged to its own error log file.

Tools exist that allow an Apache server administrator to analyze these logs for bad URLs, traffic patterns, and so on. Using these tools, an administrator can eliminate bad links, plan server capacity, or identify malicious activity ”to name only a few possibilities.

To learn more about Apache, check out the Apache documentation available online at http://httpd.apache.org. You may also want to consult the book Apache: The Definitive Guide (O'Reilly)

   


Oracle Application Server 10g Essentials
Oracle Application Server 10g Essentials
ISBN: 0596006217
EAN: 2147483647
Year: 2004
Pages: 120

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net