Recipe 11.4 Getting a Snapshot of Your Site s Activity

Recipe 11.4 Getting a Snapshot of Your Site's Activity


You want to find out exactly what your server is doing.


Enable the server-status handler to get a snapshot of what child processes are running and what each one is doing. Enable ExtendedStatus to get even more detail:

<Location /server-status>     SetHandler server-status </Location> ExtendedStatus On

Then, view the results at the URL http://servername/server-status.


Provided by mod_status, which is enabled by default, the server-status handler provides a snapshot of your server's activity. This snapshot includes some basic details, such as when the server was last restarted, how long it has been up, and how much data it has served in that time. Following that, there will be a list of the child processes and what each one is doing. At the bottom of the page is a detailed explanation of the terms used and what each column of the table represents.

The server status display shows activity across the entire server including virtual hosts. If you are providing hosting services for others, you may not want them to be able to see this level of detail about each other.

It is recommended that, as in the default configuration file that comes with Apache, you restrict access to this handler. Part of the information contained on this page is a list of client addresses and the document that they are requesting. Some users feel that it is a violation of their privacy for you to make this information readily available on your web site. Additionally, it may provide information such as QUERY_STRING variables, PATH_INFO variables, or simply URLs, which you wished to not be made public. It is therefore recommended that you add to the above recipe some lines such as:

Order deny,allow Deny from all Allow from 192.168.1

This configuration allows access only from the 192.168.0 network, or whatever network you put in there, and denies access from unauthorized Internet users.

See Also



Apache Cookbook
Apache Cookbook: Solutions and Examples for Apache Administrators
ISBN: 0596529945
EAN: 2147483647
Year: 2006
Pages: 215

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: