Plesk

AWStats page does not display images on Plesk server: AH01630: client denied by server configuration

Symptoms

Cause

The incorrect document directory path is configured for AWStats.


Custom Nginx directives preventing images from being served properly.

Resolution

  1. Connect to the server via SSH.

  2. Check the AWSTATS directives in the /etc/psa/psa.conf file and correct them as follows (if necessary):

    Debian/Ubuntu

    AWSTATS_ETC_D /etc/awstats
    AWSTATS_BIN_D /usr/lib/cgi-bin
    AWSTATS_TOOLS_D /usr/share/awstats/tools
    AWSTATS_DOC_D /usr/share/awstats

    CentOS 7/8

    In Plesk version 18.0.45 and earlier:

    AWSTATS_ETC_D /etc/awstats
    AWSTATS_BIN_D /var/www/cgi-bin/awstats
    AWSTATS_TOOLS_D /usr/share/awstats
    AWSTATS_DOC_D /var/www/html/awstats

    In version 18.0.46 and newer:

    AWSTATS_ETC_D /etc/awstats
    AWSTATS_BIN_D /usr/share/awstats/wwwroot/cgi-bin
    AWSTATS_TOOLS_D /usr/share/awstats/tools
    AWSTATS_DOC_D /usr/share/awstats/wwwroot

  3. Run the following command to update AWStats configuration values in Plesk database:

    # plesk sbin packagemng -sdf

  4. Recreate configuration files for webserver:

    # plesk repair web -domains-only

    Note: Depending on the number of websites hosted on your server execution of this utility may take some time and Apache will be restarted.

    Note: If there are custom Nginx directives used, make sure that they do not prevent images from being served properly.

Exit mobile version