<Solved> How do I enable the server-status page in Apache?
Linode
Linode Staff
Anytime I try to access /server-status
I get a 404.
I am trying to do this in CentOS 7
2 Replies
sjacobs
Linode Staff
You are going to want to ensure mod_status
is enabled.
$ sudo a2enmod status
Since you are on CentOS, you will then want to ensure the following is in the /etc/httpd/httpd.conf
file.
<IfModule mod_status.c>
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
</IfModule>
Note: the above example only serves /server-status
on localhost. It will not be visible to visitors over the public internet. The Apache documentation below provides an example if you want this to be visible to all visitors.
Finally, for the change take effect, you'll need to restart httpd
.
$ sudo systemctl restart httpd.service
Additional documentation can be found in the Apache docs, as well as the Linode Longview documentation.