Enabling mod_status

Features of mod_status

  • provides the ExtendedStatus directive, which controls whether the web server keeps detailed status of operations
    This detailed status is required for

    • including detailed information about each active connection in server-status reports

    • the RH envvar, which can be logged by mod_status to indicate which module handled the request

    • tracking of modules by mod_mpmstats, mod_backtrace, mod_whatkilledus, or server-status reports

  • provides server-status reports which can be viewed from a web browser

Follow the directions below to load the module and enable the desired features.

Loading the module

IBM HTTP Server 1.3 on Windows

Add or uncomment this directive:

LoadModule status_module modules/ApacheModuleStatus.dll

IBM HTTP Server 1.3 on Unix and Linux

Add or uncomment this directive prior to the existing ClearModuleList directive:

LoadModule status_module      libexec/mod_status.so

Additionally, add or uncomment this directive after the existing ClearModuleList directive:

AddModule mod_status.c

If the ClearModuleList directive is not used, simply add the LoadModule directive shown above to the end of the configuration file.

Other releases of IBM HTTP Server

Add or uncomment this directive:

LoadModule status_module modules/mod_status.so

Enabling ExtendedStatus

Add or uncomment this directive:

ExtendedStatus On

If httpd.conf already has this conditional logic, then ExtendedStatus will be set properly as long as the module is loaded:

<IfModule mod_status.c>
ExtendedStatus On
</IfModule>

Enabling server-status reports

Add or uncomment these directives:

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Location>

Note: The status display should be protected so that only administrators can view it. The Allow from 127.0.0.1 directive in the example above allows the server-status report to be viewed using only the loopback interface on the web server machine. In other words, the web browser must be running on the same machine as the web server. Alternate ways to control access include other forms of Allow as well as mod_auth or LDAP.