
On Debian based systems such as Ubuntu... Apache comes with mod_status compiled in by default.
mod_status provides information on your apache server activity and performance.
This tutorial will show you how to enable this feature in such a way that only requested issued from localhost will be accepted and served.
By default, server status report is commented so you can not access it. To enable it, you need to uncomment from /etc/apache2/apache2.conf:
This is a default setting, and will not work out of the box. What is said here is: server status will be acessible at location http://servername/server-status, access will be denied to everybody but people connecting from domain your_domain.com and any sub-domain from your_domain.com.
We want the server status to be provided only to people connected directly from the host running the apache server. Therefore we are going to deny access to /server-status to everybody except for people connecting from localhost, in the end the setting will look like:
OK, now that everything is set up, check that there is no error in your configuration by using:
$apache2ctl -t
if everything is fine, reload apache2 configuration with:
$sudo /etc/init.d/apache2 reload
To access apache status and activity, you need to request the page http://localhost/server-status, you could use text mode navigators such as elinks or links in order to connect through a console using ssh.
Now, you can access information such as server start time, server uptime, number of requests being processed, number of slots available .... The different keys are explained just under the server activity.
A neat feature of server-status is the ability to refresh every X seconds, in order to get up-to-date activity, by calling:
elinks http://localhost/server-status?refresh=2
In the previous example, the status will be updated every 2 seconds.
If you want to get more information from your server activity, you can add the directive:
apache built-in mod_status is an easy to set up module which can easily permit a system administrator to see how its web server is behaving by checking the average number of simultaneous request.
By using the ExtendedStatus directive, it makes it easier to point out virtual hosts and pages behaving badly.
Article of interest:
* mod_status on onlamp.com








Link
Check out http://www.onlamp.com/pub/a/apache/2000/04/21/wrangler.html
It has a lot more information and is the classical article on the subject.
Thanks for the link
Hi dune73,
Thanks for the link, I've added it as a reference.
Debuntu
nice tip
the refresh value works in firefox too :)
command line
You can also run "apachectl status" and "apache2ctl status" from the command line.
It doesn't seem to show ExtendedStatus info, however.
fullstatus
Use
apache2ctl fullstatusfor Extended Status.Cool comment
Hey Sigurd,
Cool, did not know about that.
If you have ExtendedStatus turned on, i will actually gives you a bit more information such as:
Debuntu