Create a Page that Shows Apache Status

Create a Page that Shows Apache Status

To check the current status of an Apache server, you’d usually use the log files. But there’s another way of checking the same. You can create a web page that’d display the status. You can visit this page and see if the Apache server is working as intended.

First, you need to add codes to the httpd.conf file. So open the file and add the following codes:

Code:
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Deny from all
Order deny,allow
Allow from localhost 192.168,1,56
Allow from .anotherdomain.com
</Location>
Now restart the Apache server using:

Code:
/etc/init.d/apache2 restart
Now open the browser window. You should see the following parameters:

current date and time CPU usage, total uptime, total access made to web server and total traffic. In the same browser page you could able to see PID, scoreboard which tells you about closing connections, logging connections, client’s IP address,load status, VHost name and the request made for particular pages link.

Take note of the IP address from above. From the IP address, visit the below URL:
https://your-apache-configured-web-server.com/server-status

It will display all the data related to the Apache server performance you need to know.

You can also get updated Apache server status automatically after a few seconds using this command

https://your-apache-configured-web-se…atus?refresh=N

Replace N with the number of seconds. So that’s how you create a page to display Apache server information.
Author
kumkumsharma
Views
661
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top