About Linux FAQ

Browse More FAQs:

Advertisements

Display Apache Server Status with mod_status

Posted by Vivek Gite [Last updated: June 8, 2008]

This FAQ is part 1 of 3 in the series Apache

Q. How do I display Apache server status such as current server activity and performance under Red Hat Enterprise Linux / UNIX / BSD?

A. You can use regular Linux / UNIX commands such as lsof, netstat, top, vmstat and others to view apache server activity, status and performance from a shell prompt. However, I recommend mod_status because it provides good information about Apache server.

mod_status Apache module

There is also mod_status built into Apache web server to get server status from a web browser. With this module you can easily find out how well your server is preforming. All reports are generated in a html format. You can easily find out following type of information:

  1. Total number of worker serving requests
  2. Total number of of idle worker
  3. Find the status of each worker, the number of requests that worker has performed and the total number of bytes served by the worker
  4. Total number byte count served
  5. Other information such as CPU usage, number of requests per second,current hosts and requests being processed etc.

How do I configure mod_status to display Apache web server status?

Open your httpd.conf / apache2.conf file:
# vi httpd.conf
Fnd out (append line) that read as follows to allow access from 10.1.2.5 only:

<Location /server-status>
   SetHandler server-status
   Order Deny,Allow
   Deny from all
   Allow from 10.1.2.5
</Location>

You can also restrict access using a domain name:

<Location /server-status>
   SetHandler server-status
   Order Deny,Allow
   Deny from all
   Allow from w1.g2.dc3.helpdesk.nixcraft.com
</Location>

Save and close the file. Restart web server, enter:
# service httpd restart
Fire a webbrowser and type the url http://your-server-ip/server-status or http://your-corp.com/server-status

Sample Apache Server Status Report


(Fig.01: Apache mod_status module in action)

Navigation for ApacheApache prevent hot linking or leeching of images using mod_rewrite howto»

Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

Related Other Helpful FAQs:

Discussion on This FAQ

  1. Gokdeniz Karadag Says:

    Hi,

    An undocumented or obscurely documented feature,
    appending “?notable” to the status url, like;
    http://your-server-ip/server-status?notable
    gives you a different output.

  2. patrick Says:

    I get an error when I run this command /usr/sbin/apachectl status

    here is the error:

    Unfortunately, your browser is not supported by Sitebuilder.
    Please use Internet Explorer 5.5 or later, or Mozilla.

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Tags: , , , , , , , , , , , , , , , , ,

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.