Enabling mod_status in Apache
The
mod_status
is an Apache module that assists in the practice of monitoring web server load and current httpd
connections. It comes complete with an HTML interface, and it is accessible using any browser.
To use mod_status
, we need to make a few basic configuration changes to the VirtualHosts
file, so let's start at the beginning by creating a rudimentary virtual host with the following command:
# nano /etc/httpd/conf.d/vhost.conf
Add the following lines:
<VirtualHost *:80> DocumentRoot /var/www/html ServerName servername.domain.com </VirtualHost>
Remember: if you are using Varnish, ensure that it uses the correct port:
<VirtualHost *:8080> DocumentRoot /var/www/html ServerName servername.domain.com </VirtualHost>
Having done this, you can now add the following lines between the appropriate <VirtualHost></VirtualHost>
directives in order to enable mod_status
:
<Location /server-status> SetHandler server-status...