Display Apache Server Status with mod_status

htt‮p‬s://www.lautturi.com
Display Apache Server Status with mod_status

To display the Apache server status with the mod_status module, you can use the ExtendedStatus directive in the Apache HTTPD configuration file, and then access the server-status URL on the server.

The ExtendedStatus directive enables the mod_status module, and allows it to generate an HTML page with detailed information about the current status of the Apache server. This information includes the number of requests and workers, the CPU and memory usage, and the status of each worker process.

Here is an example of using the ExtendedStatus directive to enable the mod_status module:

ExtendedStatus On

Once the mod_status module is enabled, you can access the server-status URL on the server to view the server status page. The exact URL may vary depending on your specific Apache installation and configuration, but it typically looks like this:

http://www.example.com/server-status

You can also specify the Location and SetHandler directives in the Apache HTTPD configuration file to restrict access to the server-status URL and specify the handler that will be used to generate the server status page, as shown below:

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Location>

This directive will allow access to the server-status URL only from the localhost (IP address 127.0.0.1), and will use the server-status handler to generate the server status page.

Keep in mind that the exact syntax and options for the ExtendedStatus, Location, and SetHandler directives may vary depending on your specific Apache installation and configuration. It is always a good idea to refer to the official Apache documentation for detailed instructions and further information.

Created Time:2017-10-16 14:38:42  Author:lautturi