Apache server activity and performance with mod_status

Valic —  January 25, 2011 — 2 Comments

On Debian systems … Apache comes with mod_status compiled by default.
mod_status provides information on the Apache server activity and performance.
This tutorial will show you how to enable this feature, so that only requested issued from localhost are accepted and served.

Setting mod_status up:

By default, server status report is commented so you can not access it. To enable it, you need to uncomment from /etc/apache2/apache2.conf:

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from .your_domain.com
</Location>

We want the server status to be provided only to people connected directly from the host running the apache server.
Therefore we are going to deny access to /server-status to everybody except for people connecting from localhost, in the end the setting will look like:

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Location>

NOTE: You could be using localhost instead of 127.0.0.1, or your ip if you’re not connected directly to server.

Now you need to restart your apache server using the following command:

/etc/init.d/apache2 restart

or

apache2ctl restart

Accessing Apache Status:

http://localhost/server-status

or

http://your_ip/server-status



Valic

Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

Trackbacks and Pingbacks:

  1. Apache server activity and performance with mod_status | Linux … « apache - January 25, 2011

    [...] Adres URL: Apache server activity and performance with mod_status | Linux … [...]

  2. Debian copy/paste Tutorials - Linux Tutorials - How to See Active Connections and Connections per Second on Nginx - March 11, 2013

    [...] you want to monitor your Nginx server status and all connections per second just like Apache mod_status unde Debian or any Linux/Unix distribution follow this [...]

Leave a Reply