Applications Systems

Configure Apache to allow access to the server-status page

Apache Application Monitor retrieves statistics from the built-in Apache server-status web page using Perl scripts. This article shows how to Configure Apache to allow access to the server-status page.

First published date

10/9/2018 8:37 PM

Last published date

3/24/2022 1:44 AM

Overview

Apache Application Monitor retrieves statistics from the built-in Apache server-status web page using Perl scripts.

This article shows how to configure Apache to allow access to the server-status page.

Product section

Server Application Monitor

Resolution

  1. Log on to your Apache server using an SSH or telnet client.
  2. Grant yourself root permissions (su root).
  3. Locate the Apache configuration file, typically in /etc/httpd/conf/httpd.conf 
    (For more information, see: http://wiki.apache.org/httpd/DistrosDefaultLayout)
  4. Append the following lines to your httpd.conf Apache configuration file, substituting the IP address or host name of your Apache server for localhost. Use localhost only if the Apache server services the loopback interface.
    <Location /server-status>
    SetHandler server-status
    Order Deny,Allow
    Deny from all
    Allow from localhost
    </Location>
    ExtendedStatus On
    
     
  5. Restart the Apache server (apachectl graceful).
  6. If the event a counter returns the following error, you will need to install libwww-perl.
    Can't locate LWP/UserAgent.pm in @INC ...” error:
  7. To install libwww-perl., enter the following command:
  cpan LWP::UserAgent
or
   yum install perl-libwww-perl.noarch

 

Disclaimer: Please note, any content posted herein is provided as a suggestion or recommendation to you for your internal use. This is not part of the SolarWinds software or documentation that you purchased from SolarWinds, and the information set forth herein may come from third parties. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment.  You elect to use third party content at your own risk, and you will be solely responsible for the incorporation of the same, if any.