[ Table of Contents ] [ Previous Chapter ] [ Next Chapter ]



B: Apache Modules

 

One of the most powerful features of Apache is its ability to use dynamically loadable modules to increase its functionality and flexibility as the end-user's needs grow. Such add-on modules include SSL, Fastcgi, and many others. Though iTools comes with a vast array of Apache modules both from the Apache source itself and modules from third parties, the user may still find the need to expand Apache's capabilities further.

 

Building Apache Modules

A default Apache requires that Apache modules be built against the same version of Apache that the modules are run under. iTools, even though the Apache is version 1.3.9, allows modules built under any Apache to run provided the version is greater than 1.3.4. This means that modules built for Apple's default Apache will work with iTools.

 

If you are not able to obtain pre-compiled Apache modules for the module that you want to run on iTools, you will have to compile them. In order to build Apache modules for iTools, you must have the compiler installed on OS X Server. You must also obtain a fresh Apache source tree. The current version is 1.3.9, and it can be obtained from http://www.apache.org/dist/. The next step is to break open the source tree. The usual way to this is "tar zxvf apache-1.3.9.tar.gz". You will also have to have the source tree for the module you want to build available also. Usually the process involves running a "configure" script that comes with the module with a command line option telling it where the Apache source tree is.

 

You may also need to run the "apxs" program. "apxs" is a utility supplied with Apache to aid in the building of Apache modules. The typical way of building the module is: "apxs -o mod_<module_name>.so -c *.c". Installing the module is quite easy also and is usually done by the following: "apxs -i -a -n <module_name> mod_<module_name>.so" (where <module_name> is the name of the module that you are trying to install). Please read the "INSTALL" or "README" document that comes with the module for more detailed instructions that directly apply to the specific module that you want to install.

 

Configuring Apache Modules

Once you have built and installed your Apache module, it should be placed in the /System/Library/Apache/Modules directory on your OS X Server machine. Verify that the module has been installed to the correct place. Most module install utilities add the necessary lines to your apache.conf file. You will want to check for a line that says:

 

LoadModule <module_name>_module /System/Library/Apache/Modules/mod_<module_name>.so

 

There should also be a line that says:

AddModule mod_<module_name>.c

 

Once these two directives are in place, you can use the <IfModule> directive to wrap Apache directives that are specific to a certain module. The reason for doing this is so that if the module is disabled or fails to load, Apache will still start up. Basically the <IfModule> directive only initiates the directives that are contained within if the module has loaded successfully. Please see the Apache documentation for more information on these advanced configuration topics.

 

Disabling Apache Modules

Apache modules can be disabled simply by commenting out the corresponding "LoadModule" and "AddModule" lines in the apache.conf file. Since each module takes up a certain amount of system resources, overhead, and memory, it is a good idea to disable unused modules. iTools comes with the most commonly-used modules enabled, but you should feel free to play with the configuration settings to tune iTools' performance to your own tastes and needs.

 

Included Apache Modules

Module Name

Description

mod_access.so

Provides directory host-based access control.

mod_actions.so

Allows running of CGI/ACGI scripts based on file type.

mod_alias.so

Implements aliasing of the document tree to other areas of the server host's file system. Provides for URL redirection.

mod_asis.so

The .asis file handler.

mod_auth_anon.so

Anonymous user authentication, FTP-style.

mod_autoindex.so

Automatic directory listings.

mod_cern_meta.so

Support for HTTP header metafiles.

libssl.so

Secure Socket Layer (SSL) support.

mod_cgi.so

Provides for execution of UNIX CGI scripts.

mod_digest.so

MD5 authentication.

mod_dir.so

Provides for directory indexing.

mod_env.so

Provices for passing environment variables to UNIX CGI scripts.

mod_expires.so

Apply Expires: headers to resources

mod_fastcgi.so

Adds Fast CGI support used in WEBmail.

mod_headers.so

Add arbitrary HTTP headers to resources

dbm_auth_module and auth_module

Provides for user authentication using textual/dbm files.

mod_imap.so

Support for image maps and clickable map files.

mod_include.so

Handles server parsed HTML documents (SSI -- Server Side Includes).

mod_info.so

Provides server configuration information at the URL:

http://your.server.name/server-info

mod_jserv.so

Adds jserv support.

mod_log_config.so

User-configurable logging replacement for mod_log_common.

mod_mime.so

Determines document MIME types and handlers.

mod_mime_magic.so

Determining document types using "magic numbers".

mod_negotiation.so

Allows selection among multiple documents based on client capabilities, as in documents to be served in several languages.

mod_php3.so

mod_php4.so

Adds PHP language support.

mod_rewrite.so

Powerful URI-to-filename mapping using regular expression.

mod_setenvif.so

Set environment variables based on client information.

mod_speling.so

Automatically correct minor typos in URLs.

mod_status.so

Provides iTools server statistics at the URL:

http://your.server.name/server-status

mod_unique_id.so

Generate unique request identifier for every request.

mod_userdir.so

User home directories.

mod_usertrack.so

Provides logging of user activity on the server.

mod_vhost_alias.so

Support for dynamically configured mass virtual hosting.

mod_webcatalog.so

Adds WebCatalog support.

Note: not all modules are active in a default iTools installation.



Copyright 1999. Tenon Intersystems. All Rights Reserved.