25 September, 2021

Plesk

liton

381 views


  1. Connect to the 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), 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.2 and 203.0.113.3:

      • for Apache 2.2:

        <IfModule mod_status.c>
        <Location /server-status>
        SetHandler server-status
        Order deny,allow
        Deny from all
        Allow from 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 ip 203.0.113.2 203.0.113.3
        </RequireAny>
        </Location>
        ExtendedStatus On
        </IfModule>

  5. Restart Apache web-server:

    • 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

 

source: https://support.plesk.com/hc/en-us/articles/213922425-How-to-enable-the-Apache-server-statistics-on-a-Plesk-server