Apache modstatus

The Status module allows a server administrator to find out how well their server is performing. A HTML page is presented that gives the current server statistics in an easily readable form. If required this page can be made to automatically refresh (given a compatible browser). Another page gives a simple machine-readable list of the current server state.

Official doc

Installing

Make sure mod_status is loaded

Check your apache config file for:

LoadModule status_module modules/mod_status.so

Turn extended-status on

ExtendedStatus On

Find a virtual host you want to add server-status to and add:

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

Check your .htaccess file for rewrites:

If you have a line like:

RewriteRule ^ index.php [QSA,L]

then add a condition before it:

RewriteCond %{REQUEST_URI} !^/server-status

Restart apache

service httpd restart

Locking down /server-status

Restrict by ip address

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

restrict by login

<Location /server-status>
SetHandler server-status
AuthType basic
AuthName "Apache status"
AuthUserFile /etc/httpd/conf/server-status_htpasswd
Require valid-user
</Location>

remember to service httpd restart

Using

Enter http://server/server-status in your browser Use ?refresh=N to refresh every N seconds