Navigation
Most popular articles 
- Why in my workgroup user names in statistics and ... (24848 views)
- HP Install Network Printer Wizard 4.0 - Configuring a ... (19770 views)
- How to configure Apache versions 1.3.x - 2.0.x ? ... (18096 views)
- The application failed to initialize properly (0xc0000142). Click on ... (16142 views)
- How to set proxy for my Windows XP computer ... (14363 views)
- Moving XP User Profile (13562 views)
- HP Jetdirect Print Servers - Installing and Configuring a ... (11755 views)
- Windows Vista: SuperFetch and External Memory Devices (9421 views)
- Shutdown is very slow - Windows XP (9108 views)
- Troubleshooting Windows XP Shutdown Issues (7867 views)
Latest articles 
- Error installing agent service causes Access Denied Error (2010-07-10 19:19)
- An error has occurred while establishing a connection from ... (2010-07-10 19:18)
- How do I install Security Tracker TSxx software for ... (2010-07-10 19:17)
- Terminal Server registry settings for applications (2010-07-10 19:15)
- What is riskware? (2010-07-10 19:13)
Sticky articles
HSLAB HTTP Monitor
Setting mod_status up
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:
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from .your_domain.com
</Location>
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:
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
Note: You could be using localhost instead of 127.0.0.1, but keep in mind that if the directive HostnameLookups is turned to Off, apache won't let you access to http://localhost/server-status .
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
Accessing Apache Status
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.
Getting more from Apache Server-status
If you want to get more information from your server activity, you can add the directive:
ExtendedStatus On
just above the <Location /server-status> directive. But keep in mind that this cannot be set on a per virtualhost basis and will use more resources.
But in another hand, you will be able to access more informations such as:
- Total accesses
- CPU usage
- number of requests/sec, Bytes/sec and Bytes/request
- See the different clients connected to your server, on which virtual host as well as the page there are requesting, you can even access the time it took to request a specific page as well as the resources required.
Conclusion
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.
Tags: -
Related entries:
- How to configure Apache versions 1.3.x - 2.0.x ?
- How to configure For Apache versions 2.2.x ?
- What is HSLAB Print Logger?
- Locating Performance Bottlenecks
- How to configure Apache Module mod_status
- For maintenance of the exact accounting you should to adjust some printer's parameters
- How to install and configure mod_status?
- Install mod_status
- Current Apache status is with the mod_status module
- Moving XP User Profile
- Creating a Windows NT LPD Server Print Queue
- How to Use and Troubleshoot HP JetDirect NIC Printing
- Shutdown is very slow - Windows XP
- Securing Printer Usage in Windows Server 2003
- Apache Name-based Virtual Host Support
Last update: 2006-12-22 02:20
Author: Oleg
Revision: 1.0
You cannot comment on this entry