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> ...

Get Troubleshooting CentOS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.