Enabling mod status for Monitoring Apache HTTPD
i12bretro
If you use this to make something awesome let me know in the comments
Full steps can be found at https://i12bretro.github.io/tutorials/0036.html
Enabling mod_status in Apache HTTPD
Navigate to the PHP install directory
Edit /php.ini
Press CTRL+F, type curl, press Enter
Uncomment the extension to enable it by removing the ; at the start of the line extension=curl
Navigate to the Apache install directory
Edit /conf/httpd.conf
Press CTRL+F, type mod_status, press Enter
Uncomment the module to enable it by removing the # at the start of the line LoadModulestatus_modulemodules/mod_status.so
At the bottom of the file paste the following ExtendedStatusOn
SetHandlerserver-status Orderallow,deny Allowfromall
Note: By default this will only allow access from the host Apache is running on
Restart the Apache service to apply the changes
Open a web browser and navigate to http:///server-status ?refresh=5 will refresh the display every 5 seconds ?auto will display the output in a text only format
Cringe at the output displayed
Style and Modernize /server-status
- Download PHP Simple DOM https://sourceforge.net/projects/simplehtmldom/files/ https://simplehtmldom.sourceforge.io/manual.htm
- Create a status folder inside apache/htdocs
- Copy/Paste simple_html_dom.php inside apache/htdocs/status
- Download server-status.php https://drive.google.com/open?id=1f1HBZgdjTcYuYq6ut4PXyiaYC7vGd_ty
- Copy/Paste server-status.php inside apache/htdocs/status
- Open a web browser and navigate to http:///status/server-status.php ?getStatus will return a JSON output of the server-status data ... https://www.youtube.com/watch?v=m1xxg-L6oSo
24966243 Bytes