X hits on this document





112 / 142

Chapter 18. Apache About Apache

Apache is the most popular Web (HTTP) server on the Internet and a standard open source piece of soft- ware. It's name doesn't really have anything to do with American Indians. Instead, it's name comes from the way it is built. It is "a patchy" server, meaning that it is made up of many modular parts to create a coherent whole. This design philosophy has made the application very extensible. For example, there are the core modules that make up the server's ability to listen for connections, retrieve files, and return them to the requesting client (the "user agent" in HTTP parlance). There are other modules dealing with logging transactions and CGI (common gateway interface) scripting. Other modules allow you to rewrite incoming requests, manage email, implement the little-used HTTP PUT method, write other modules in Perl, or transform XML files using XSLT. Apache is currently at version 2.0, but for some reason many people are still using the 1.3 series.

Installing Apache is similar to installing Perl or Swish. For Windows you:

  • 1.

    download the distribution

  • 2.

    run the installer

  • 3.

    open a command prompt

  • 4.

    navigate to the Apache directory

  • 5.

    start the server with c:\apache\apache.exe --standalone

On Unix/Linux you:


download the distribution


unzip it


untar it





  • 6.

    sudo make install

  • 7.

    start the server ( /usr/local/apache/bin/apachectl start )

Being "a patchy" server, Apache is very extensible. Mod_perl is such an extension. It allows Perl pro- grammers to write scripts to handle low level HTTP server functions. One of these scripts (actually a set of scripts) is called AxKit, an XSLT transformation engine. AxKit allows content providers to save XML files on their servers, have them associated with XSLT stylesheets, and have the XML files trans- formed on the fly by the stylesheets before they are sent to the user-agent for display.

Installing mod_perl and AxKit are beyond the scope of this workbook, but the author's water collection has been implemented as an AxKit service. The entire user end of the system is made up of two files (an XML data file and an XSLT stylesheet) plus a set of JPEG images. No CGI scripts. As the Apache serv- er receives requests the query strings are read and passed on to the stylesheet. The stylesheet reads the


Document info
Document views342
Page views348
Page last viewedThu Oct 27 23:28:53 UTC 2016