Sunday, 18 November 2018

How to configure apache mod_status module in CentOS 7

Apache module mod_status is an open source module that allow to monitoring web server load, statistics, current state including worker processes and active connections.
Create mod_status.conf file with the following content under /etc/httpd/conf.modules.d/:

[root@linuxcnf ~]# touch /etc/httpd/conf.modules.d/mod_status.conf
[root@linuxcnf ~]# vi /etc/httpd/conf.modules.d/mod_status.conf
LoadModule status_module modules/
<Location /server-status>
  SetHandler server-status
  Order allow,deny
  Allow from

Change Allow from IP address with the source IP address to access the server.

Check for the syntax errors in configuration using following command:

[root@linuxcnf ~]# httpd -t
Syntax OK
[root@linuxcnf ~]#

If syntax is OK then restart the httpd service.

[root@linuxcnf ~]# service httpd restart

Now, open any web browser and access the Apache status page using url “http://SERVER-IP/server-status“.

No comments:

Post a comment