How to enable the Apache server-status on centos 7
Enabling the Apache server-status on centos 7
mod_status is an Apache module which helps to monitor web server load and current httpd connections with an HTML interface which can be accessible via a web browser. Apache’s mod_status shows a plain HTML page containing the information about current status of web server state.
Installation
Let's start by Installing the httpd package on centos 7 machine.
[root@linuxhelp1 ~]# yum install httpd -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.xeonbd.com
* extras: mirror.xeonbd.com
* updates: mirror.xeonbd.com
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-88.el7.centos will be installed
--> Processing Dependency: httpd-tools = 2.4.6-88.el7.centos for package: httpd-2.4.6-88.el7.centos.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-88.el7.centos.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-88.el7.centos.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-88.el7.centos.x86_64
.
.
.
Verifying : apr-1.4.8-3.el7_4.1.x86_64 2/5
Verifying : mailcap-2.1.41-2.el7.noarch 3/5
Verifying : httpd-2.4.6-88.el7.centos.x86_64 4/5
Verifying : apr-util-1.5.2-6.el7.x86_64 5/5
Installed:
httpd.x86_64 0:2.4.6-88.el7.centos
Dependency Installed:
apr.x86_64 0:1.4.8-3.el7_4.1 apr-util.x86_64 0:1.5.2-6.el7
httpd-tools.x86_64 0:2.4.6-88.el7.centos mailcap.noarch 0:2.1.41-2.el7
Complete!
Start and enable the apache service.
[root@linuxhelp1 ~]# systemctl start httpd
[root@linuxhelp1 ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
Configure server-status on apache main configuration file.
[root@linuxhelp1 ~]# vim /etc/httpd/conf/httpd.conf
<IfModule mod_status.c>
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Allow from all
</Location>
</IfModule>
In order to make the changes effect, you'll need to restart httpd.
[root@linuxhelp1 ~]# systemctl restart httpd
The Apache status page will be accessible via your domain name along with the “/server-status” at the end. i.e) http://serveripaddress/server-status or http://serev-hostname/server-status With this the method to enable the Apache server-status on centos 7 comes to an end.
Comments ( 0 )
No comments available