Steps to enable the Linux Status module
The details displayed on the mod_status page are as follows:
- The number of workers serving requests.
- The number of idle workers.
- The status of each worker, the number of requests each worker has handled, and the total number of bytes served by each worker. *
- The total number of accesses and bytes served. *
- The time the web service was started/restarted and how long it has been running.
- The current percentage of CPU used by each worker and the total used.*
- The current hosts and the requests being processed.*
Note that items marked with an (*) are only accessible if the “ExtendedStatus” variable is enabled.
To enable mod_status, you must add the following lines to the Apache configuration file (normally located at /etc/apache2/apache2.conf ):
<Location /server-status>
SetHandler server-status
Order Deny,Allow
Deny from all
Allow from .dominio.com
</Location>This code will allow you to access the detailed report from http://dominio.com/server-status. If you modify the variable “Allow” and specify “Allow from all” while commenting out the line “Deny from all”, the page will be visible from all domains hosted on the server as long as you specify “/server-status” at the end. For example:
<Location /server-status>
SetHandler server-status
Order Deny,Allow
#Deny from all
Allow from all
</Location>Additionally, you can replace “server-status” in the line “Location” with whatever you want, and the page will be accessible through the specified page.
ExtendedStatus
The variable “ExtendedStatus” will allow you to view additional information on the page for mod_status. To use it, you only need to add the line “ExtendedStatus On” at the end of the code:
<Location /server-status>
SetHandler server-status
Order Deny,Allow
Deny from all
Allow from .dominio.com
</Location>ExtendedStatus On
Once you have made all these changes, you only need to restart the Apache service, and the page will be visible:
/etc/init.d/apache2 restartNotice
Before enabling mod_status, it is important to protect it beforehand or specify a page known only to the person making the changes. This is important because if the default values are specified, the web server status information is likely to be accessible to everyone.
We recommend that once you have reviewed the information you need, you disable mod_status by removing the relevant code from the Apache configuration file and restarting the service.
For more information about using mod_status, you can visit the official Apache documentation at Apache Module mod_status.
Warning
The mod_status module normally comes compiled with Apache, so if you have Apache, you do not need to install it.