Server Status

For this exercise, which includes info as previously, the httpd.conf in ... /site.status file should look like this:

User webuser
Group webgroup
ServerName www.butterthlies.com
DocumentRoot /usr/www/APACHE3/site.status/htdocs
ExtendedStatus on

<Location /status>
order deny,allow
allow from 192.168.123.1
deny from all
SetHandler server-status
</Location>

<Location /info>
order deny,allow
allow from 192.168.123.1
deny from all
SetHandler server-status
SetHandler server-info
</Location>

The allow from directive keeps our laundry private.

Remember the way order works: the last entry has the last word. Notice also the use of SetHandler , which sets a handler for all requests to a directory, instead of AddHandler, which specifies a handler for particular file extensions. If you then access www.butterthlies.com/status, you get this response:

Apache Server Status for www.butterthlies.com Server Version: Apache/1.3.14 (Unix) Server Built: Feb 13 2001 15:20:23 Current Time: Tuesday, 13-Feb-2001 16:03:30 GMT Restart Time: Tuesday, 13-Feb-2001 16:01:49 GMT Parent Server Generation: 0 Server uptime: 1 minute 41 seconds Total accesses: 21 - Total Traffic: 49 kB CPU Usage: u.0703125 s.015625 cu0 cs0 - .0851% CPU load .208 requests/sec - 496 B/second - 2389 B/request 1 requests currently being processed, 5 idle servers _W___ _.......................................................... ................................................................ ................................................................ ...

Get Apache: The Definitive Guide, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.