Configure the "mod-status" Apache module

The Apache mod-status module gives access to several performance counters at the following URL:

    http://<ApacheWebServerHost:Port>/<server_status_name>?auto

The default value for 'server_status_name' is 'server-status' (URL: http://ApacheWebServerHost:Port/server-status?auto.) 

By default the module is not enabled. To activate the module, edit your httpd.conf file and search for the following set of configuration directives:

# LoadModule status_module modules/mod_status.so

Un-comment this line by removing the # character, and:

# Allow server status reports, with the URL of http://servername/server-status
# Change the ".your_domain.com" to match the domain to be enabled.
#
#
 <Location /server-status>
#    SetHandler server-status
#    Order deny,allow
#    Deny from all
#    Allow from .your_domain.com
# </Location>

Un-comment everything from <Location /server-status> to </Location> by removing the # characters from the beginning of each line.

The easiest way to protect your server-status is to restrict its access to one computer or domain. Change the .your_domain.com to the name of a computer or domain you wish to allow a preview of the server-status. For example, if you want to only allow your computer, mycomputer.mydomain.org access, your server-status configuration would look something like this:

# Allow server status reports, with the URL of http://servername/server-status
# Change the ".your_domain.com" to match the domain to be enabled.
#


 <Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from mycomputer.mydomain.org

 </Location>

Find the following lines and un-comment (remove the initial #) the ExtendedStatusdirective; the result should look like this:

# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
ExtendedStatus On

Save your httpd.conf file, shut down and start Apache.

# /usr/local/apache/sbin/apachectl stop
/usr/local/apache/sbin/apachectl stop: httpd stopped
# /usr/local/apache/sbin/apachectl start
/usr/local/apache/sbin/apachectl start: httpd started
#




Go back to the Learning center:


Copyright © AgileLoad. All rights reserved.
Agile Load testing tool| Contact AgileLoad | Terms of Use | Sitemap