How to View Apache Server Status Page
Monitoring your web server’s health is crucial for maintaining
optimal performance and troubleshooting sudden traffic spikes. This
article provides a straightforward guide on how to enable and view the
Apache HTTP Server status page using the mod_status module.
You will learn how to configure the module in your server files, secure
access to authorized users, and interpret the real-time metrics
displayed on the status dashboard.
Step 1: Enable the mod_status Module
Before you can view the status page, you need to ensure that the
mod_status module is enabled on your Apache server. On most
modern Linux distributions, this module is enabled by default.
- On Ubuntu/Debian systems: You can explicitly enable
the module by running the following command in your terminal:
sudo a2enmod status - On CentOS/RHEL systems: The module is typically
loaded by default via the main configuration file. You can verify this
by checking for the following line in
/etc/httpd/conf.modules.d/00-base.conf:LoadModule status_module modules/mod_status.so
Step 2: Configure Access in Apache
For security reasons, you must restrict who can view the server
status page, as it exposes sensitive information about your server’s
operation and active connections. You will need to edit your Apache
configuration file (such as
/etc/apache2/mods-enabled/status.conf on Debian or
/etc/httpd/conf.d/server-status.conf on RHEL).
Add or modify the configuration block to look like this:
<Location "/server-status">
SetHandler server-status
Require local
# To allow remote access from a specific IP, uncomment the line below:
# Require ip your_local_ip_address
</Location>Using Require local ensures that only requests
originating from the server itself can access the page. If you need to
monitor the server remotely, replace your_local_ip_address
with your actual public or VPN IP address.
Step 3: Enable Extended Status (Optional)
By default, Apache only provides a basic summary. If you want full
tracking information—including CPU usage, bytes per second, and the
exact requests currently being processed—you should enable the
ExtendedStatus directive.
Add the following line outside of the <Location>
block in your configuration file:
ExtendedStatus OnStep 4: Restart the Apache Service
For any configuration changes to take effect, you must restart your Apache web server. Use the appropriate command for your operating system:
- Ubuntu/Debian:
sudo systemctl restart apache2 - CentOS/RHEL:
sudo systemctl restart httpd
Step 5: Access the Status Page
Once the server restarts, you can view the live status page through a web browser or the command line.
- Via Web Browser: If you are accessing it locally or
have allowed your remote IP, navigate to:
http://your_server_ip/server-status - Via Command Line: If you are SSH’ed into the server
and want a quick look, use a text-based browser like
curlorlynx:curl http://localhost/server-status
To get a automatically refreshing version of the page, you can append
?refresh=N to the URL, where N is the number
of seconds between updates (for example,
http://localhost/server-status?refresh=5).