How to enable the Apache server statistics on a Plesk server

  1. Connect to a Plesk server via SSH.

  2. Check if "status_module" is loaded:

    • for CentOS/RHEL-based distributions:

      # httpd -M | grep status
      status_module (shared)

    • for Debian/Ubuntu-based distributions:

      # apache2ctl -M | grep status
      status_module (shared)

      If the output is empty, enable the "status" module in Plesk at Tools & Settings > Apache Web Server.

  3. Find out Apache version:

    • for CentOS/RHEL-based distributions:

      # httpd -v | grep version

    • for Debian/Ubuntu-based distributions:

      # apache2 -v | grep version

  4. To make status reports visible to your IP address (from which you access this page in a browser) and localhost, add the below code to the Apache configuration file (create a new file, if there is no):

    • CentOS/RHEL-based distributions:
          CentOS 7/etc/httpd/conf.modules.d/status.conf
          CentOS 6/etc/httpd/conf.d/status.conf

    • Debian/Ubuntu-based distributions: /etc/apache2/mods-enabled/status.conf

      In this example, we are allowing status reports to IP addresses 203.0.113.2203.0.113.3 and localhost:

      • for Apache 2.2:

        <IfModule mod_status.c>
            <Location /server-status>
                SetHandler server-status
                Order deny,allow
                Deny from all
                Allow from 127.0.0.1 localhost ip6-localhost 203.0.113.2 203.0.113.3
            </Location>
            ExtendedStatus On
        </IfModule>

      • for Apache 2.4:

        <IfModule mod_status.c>
            <Location /server-status>
                SetHandler server-status
                <RequireAny>
                    Require local
                    Require ip 203.0.113.2 203.0.113.3
                </RequireAny>
            </Location>
            ExtendedStatus On
        </IfModule>

      Note: If "mod_status" is loaded into the server, its handler capability will be available in all configuration files, including per-directory files (for example, .htaccess). This may have security-related ramifications for your website.

  5. Restart Apache:

    • for CentOS/RHEL-based distributions:

      # service httpd restart

    • for Debian/Ubuntu-based distributions:

      # service apache2 restart

    Server statistics will now be available at http://your.server.ip.address/server-status

  • plesk, apache
  • 4 Users Found This Useful
Was this answer helpful?

Related Articles

Connecting using PuTTY on Windows workstations

Configuring PuTTY In PuTTY, under Session, enter your Host Name Under Connection choose Data...

How to install the php-mcrypt module on a Plesk server

Question How to install the php-mcrypt module on a Plesk server? Answer Notes: The solution in...

Windows: Accessing Your Server with Remote Desktop

This article explains how to use Remote Desktop to access your Windows server’s desktop from...

What is Reverse DNS?

Reverse DNS (rDNS) is name resolution that looks up an IP addresses to obtain a domain name,...

What is Reverse DNS?

Reverse DNS (rDNS) is name resolution that looks up an IP addresses to obtain a domain name,...