See Also:
http://www.printlogger.com   Printer accounting software
http://www.sys-monitoring.com   System monitoring software
http://www.hs-lab.com   Software for Business and Home
http://win-printing.com   Windows Printing Software,
Articles and Press Release
     
Handy Software Lab's Software Products
     
HSLAB Force Down   HSLAB Print Logger Family
HSLAB Shutdown Folder   HSLAB Sys Monitor
HSLAB Logger   HSLAB Prefetch Manager
HSLAB HTTP Monitor Family   HSLAB WhoIs
HSLAB Security TrackerFamily    
     
     

HSLAB HTTP Monitor

ID #1025

How to install and configure mod_status?

So how do you install and configure mod_status? I make the assumption here that you built and installed Apache from source. If you're not familiar with building Apache, may I suggest you read my earlier HTTP Wrangler column, Getting, Installing, and Running Apache.

First, move into your Apache source directory.

?

% cd /usr/local/src/apache_1.3.x

Thankfully Apache's configure script creates a cache file, config.status, saving us the bother of completely reconfiguring our Apache build from scratch. All we need to do is run config.status, supplying the one argument necessary to add mod_status.

If you've not already done so, now would be the time to become root.

?

# ./config.status --enable-module=status
Configuring for Apache, Version 1.3.11
...
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for Linux platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ checking for system header files
+ adding selected modules
+ checking sizeof various data types
+ doing sanity check on compiler and options
...
Creating Makefile in src/modules/standard

Note: Apache's configure script automagically updates config.status to include mod_status; next time you configure you will not need to enable mod_status again.

Now that we've reconfigured Apache, let's rebuild.

?

# make

Your screen should look something like:

?

# make
===> src
make[1]: Entering directory ´src/httpd/apache_1.3.11'
make[2]: Entering directory ´src/httpd/apache_1.3.11/src'
===> src/regex
...
[several unsightly lines later]
...
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite
-DNO_DL_NEEDED ´../apaci´ -o ab -L../os/unix -L../ap ab.o
-lap -los -lm -lcrypt
make[2]: Leaving directory ´src/httpd/apache_1.3.11/src/support'
<=== src/support
make[1]: Leaving directory ´src/httpd/apache_1.3.11'
<=== src
#

Finally, you're ready to install your newly freshly built Apache.

?

# make install

(While not strictly necessary -- reinstalling should only overwrite files that probably haven't changed since your last install -- I always advise backing up your Apache directory.)

Configuration

Mod_status is easy to configure; in fact the directives already exist in your httpd.conf file and simply need to be uncommented and edited slightly. If you're not familiar with Apache configuration, may I suggest you read my earlier HTTP Wrangler column, An Amble Through Apache Configuration.

?

# cd /usr/local/apache/conf

(or wherever your Apache installation's configuration files are located)

Open your httpd.conf file in the text editor of your choice and search for the following set of configuration directives:

?

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

Uncomment everything from &amp;lt;Location /server-status&amp;gt; to &amp;lt;/Location&amp;gt; by removing the # characters from the beginning of each line.

It's wise to protect your server-status output from prying eyes. The easiest way to do this 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 peek at server-status. For example, if you're the webmaven for your server, you may want to allow only your computer, mycomputer.mydomain.org access, your server-status configuration would look something like:

?

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

Tags: -

Related entries:

Last update: 2006-12-22 02:05
Author: Oleg
Revision: 1.0

Digg it! Share on Facebook Print this record Send article to a friend Show this as PDF file
Please rate this article:

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry