How to set apache server status using mod_status

→ Are you a new visitor? Please visit the page guidance for new visitors ←

How to set apache server status using mod_status

What is apache server status? Normally only server administrators would have access to this section, they would look at this specific page to lookup more information on their current server activity in an easily readable form.

The current information you can view from this page are:

  • The number of worker processes serving requests currently active
  • The number of idle worker processes
  • The status of each worker process, which includes the number of requests that specific worker process has performed and the total number of bytes served by the worker ( only if extended status is enabled )
  • A total number of accesses and byte count served by the web server ( only if extended status is enabled )
  • The number of times the server was started/restarted and the time it has been running for
  • Averages giving the number of requests per second, the number of bytes served per second and the average number of bytes per request ( only if extended status is enabled )
  • The current percentage CPU used by each worker process and in total by Apache ( only if extended status is enabled )
  • The current hosts and requests being processed ( only if extended status is enabled )

An example of how it should look is below (the information has been altered of course, I couldn’t really leave the exact details):

How to enable mod_status page on apache web server

Enabling mod_status page is as simple as adding a few lines to your apache web server. The only thing you need to keep in mind, the extended status mode will normally use a bit more resources and should be enabled only if the server has enough resources or specifically needed.

We would need to first choose a location where we want to have server status enabled, by default, this is set to /server-status/ but it can be anything you really want.

And that’s it for enabling server status. To enable the Extended status which by default is disabled, you only add to your web server configuration file:

Another option which I found interesting is the SeeRequestTail, if the request file name has more than 63 characters it will only show the last 63 which is better in knowing what’s going on when you have too many requests hitting the server at one point and the url has more than 63 characters.

The same as enabling ExtendedStatus, you add the following line:

That’s it for now, see you again in our next tutorial.

Request an article ←