How do I display Apache server status such as current server activity and performance?
mod_status Apache module
There is mod_status built into Apache web server to get server status from a web browser. With this module you can easily find out how well your server is preforming.
What info can i get from the modlue?
Using mod_status you get to see:
- The number of children serving requests
- The number of idle children
- The status of each child, the number of requests that child has performed and the total number of bytes served by child
- A total number of accesses and byte count served
- The time the server was started/restarted and the time it has been running for
- Averages giving the number of requests per second, the number of bytes served per second and the average number of bytes per request
- The current percentage CPU used by each child and in total by Apache
- The current hosts and requests being processed.
How do i configure it?
1. open httpd.conf for editing
2.You should check that the module is loaded by making sure the following entry exists in httpd.conf:
LoadModule status_module lib/mod_status.so
3. find out “<Location /server-status>” and make changes so that it looks like this
Deny from all
Allow from 127.0.0.0
Allow from *.domain.com
Note: by allowing only 127.0.0.0, you are securing the module in a way that no one else can view the status results apart from the 127.0.0.0 which is the localhost
If you want to allow all your network computers to view the server status, then add *.domain.com where domain.com is the name of your company domain name.
you can specify the range of IP address also.
3. Save and Close httpd.conf
4. Restart Apache
How to check results?
type the url http://your-server-ip/server-status