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

Follow

Comments

19 comments

  • Avatar
    Alban Staehli

    It worked for me, but with a slightly different approach:
    - In my case, the AWSTATS_DOC_D in /etc/psa/psa.conf was wrong, so I had to change it between step 1 and step 2.
    - Then, instead of editing /etc/httpd/conf/httpd.conf, I've added the lines in step 4 to /etc/httpd/conf.d/awstats.conf

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Alban, thank you for sharing your case.

    Adjusting AWSTATS_DOC_D is included in step 2.

    As for modifying  /etc/httpd/conf.d/awstats.conf instead of  /etc/httpd/conf/httpd.conf, it is a valid variation of the provided solution.

    0
    Comment actions Permalink
  • Avatar
    wp4all

    Hi @ all,

    I've got the same problem as Alban in my case AWSTATS_DOC_D was pointing to /var/www/html/awstats so we changed it in /etc/psa/psa.conf.

    Also, we changed the path in  /etc/httpd/conf/httpd.conf, with the right entries : /usr/share/awstats/wwwroot/icon and /usr/share/awstats/wwwroot/css in step 4.

    We did also a restart of the httpd daemon but it still points to /var/www/html/awstats and the FireBug shows 404 Not Found error for all images.

     

    Any Idea why it ignores our changes?

    Greetings Chris

    0
    Comment actions Permalink
  • Avatar
    Alisa Kasyanova (Edited )

    @ wp4all
    Hi Chris! Please also check /etc/httpd/conf.d/awstats.conf and /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf (even though the latter should be recreated after Apache restart), these files can also point awstats to another folder.

    0
    Comment actions Permalink
  • Avatar
    Peter Debik

    Please review the case distinction in "Resolution" section (2.). In the CentOS 7 default installation with Plesk, AWStats is not located in /var/www/html, but in /usr/share/awstats/wwwroot. The section asks "For CentOS 7 use the following values:"

    AWSTATS_DOC_D /var/www/html/awstats

    But that is not what you want to use, it is what the wrong state is. The correct variable setting ("... use the following values:") should read

    AWSTATS_DOC_D /usr/share/awstats/wwwroot

    1
    Comment actions Permalink
  • Avatar
    Nikita Nikushkin

    Hi @Peter Debik,

    Thank you for the feedback!

    I checked the configuration files on my test environments and updated the article with new info

    0
    Comment actions Permalink
  • Avatar
    Peter Debik

    I found that on several of our out-of-the-box Plesk installations, a part that is needed in /etc/httpd/conf/httpd.conf was missing:

    <Directory "/usr/share/awstats/wwwroot/icon">
    AllowOverride None
    Require all granted
    </Directory>
    <Directory "/usr/share/awstats/wwwroot/css">
    AllowOverride None
    Require all granted
    </Directory>

    This must be present in /etc/httpd/conf/httpd.conf, else the icons of AWstats wont's display.

     

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Peter,

    Please, let me know the OS and Plesk version, we'll try to reproduce it on a test set.

    0
    Comment actions Permalink
  • Avatar
    Peter Debik

    CentOS 7.7, Plesk Onyx, latest MU installed.

    0
    Comment actions Permalink
  • Avatar
    Alexandr Nikolaenko

    Hello @Peter,

    I have just checked on a fresh Onyx installation and there is no such directives. The path "/usr/share/awstats/wwwroot" also seems to be non-default. Web files of AWstats are located at "/var/www/html/awstats".

    The directives itself does not look like required for icons display. Probably they appeared due to customized web path.

    0
    Comment actions Permalink
  • Avatar
    Peter Debik

    A possible explanation could be that the hosts are coming from 12.x installations. I am sure we have never changed the paths (we never change default paths anyway).

    0
    Comment actions Permalink
  • Avatar
    Lev Iurev

    @Peter Debik I suppose that awstat was installed from the wrong repository, please check its packager.

    0
    Comment actions Permalink
  • Avatar
    Peter Debik (Edited )

    It is a good idea, but we are using nothing but the original CentOS, Plesk and MariaDB repositories. No machine here is using anything else. It is all absolutely authentic from the original repositories. AWStats was auto-installed by Plesk on all machines. There have never been any customizations from our side. The reason for that strategy here is, that we must make sure that all systems are in sync and have the "perfect" configuration that the vendor suggests to avoid any such issues as described herein.

    0
    Comment actions Permalink
  • Avatar
    Leonid Gukhman

    @Peter Debik

    Let me check if the issue is reproduced in an upgrade scenario.

    0
    Comment actions Permalink
  • Avatar
    Leonid Gukhman

    @Peter Debik

    I have double-checked the paths on test installations and updated them in the article; they are the same for CentOS 6 and 7.

    Regarding the Apache configuration directive in /etc/httpd/conf/httpd.conf - it has not appeared, either. It is also not required for AWStats to function. Seems like it was used as a workaround of some kind.

    My initial test installation was Plesk 12.0, then I upgraded it to 12.5 - 17.0 - 17.5 - 17.8. The Apache directives have not appeared during the process. I have also removed the corresponding step from the article.

    0
    Comment actions Permalink
  • Avatar
    Sergio Manzi

    Confirming @Peter Debik's finding:

    With Plesk Obsidian Version 18.0.29 Update #3 (updated from Onyx) under CentOS Linux 7.8 the correct setting for AWSTATS_DOC_D is /usr/share/awstats/wwwroot

    # cd /var/www/html/awstats
    -bash: cd: /var/www/html/awstats: No such file or directory

    0
    Comment actions Permalink
  • Avatar
    Bulat Tsydenov

    Hi Sergio Manzi!

    Can you let me know the output of the following commands:

    # grep awstats /var/log/yum.log*
    # rpm -qi awstats
    0
    Comment actions Permalink
  • Avatar
    Sergio Manzi

    Hello Bulat Tsydenov!

    Sorry, my configuration has changed in the meanwhile as I decided to reinstall awstats from the Plesk repo as detailed in https://support.plesk.com/hc/en-us/articles/213930765-AWStats-web-statistics-page-does-not-work-as-expected 

    I intended to update here, but then I was caught into some family issues and eventually forgot to do it, sorry.

    Anyway I think you can get some meaningful information from my logs:

    # grep awstats /var/log/yum.log*
    /var/log/yum.log:Sep 14 23:25:52 Updated: awstats-7.8-1.el7.noarch
    /var/log/yum.log:Sep 16 08:32:02 Erased: awstats-7.8-1.el7.noarch
    /var/log/yum.log:Sep 16 08:34:18 Installed: awstats-7.7-2.centos.7+p18.0.27.0+t200424.1018.noarch
    /var/log/yum.log-20200515:May 02 20:56:57 Updated: awstats-7.7-2.centos.7+p18.0.23.0+t191224.1303.noarch
    /var/log/yum.log-20200905:Jun 25 12:23:43 Updated: awstats-7.7-2.centos.7+p18.0.27.0+t200424.1018.noarch

     

    As you can see, at the time of my above post awstats was version 7.8-1 from the el7 repo, while I'm now using 7.7-2 from the Plesk repo as confirmed from the output of "rpm -qi awstats":

    Name        : awstats
    Version : 7.7
    Release : 2.centos.7+p18.0.27.0+t200424.1018
    Architecture: noarch
    Install Date: Wed 16 Sep 2020 08:34:17 AM UTC
    Group : Applications/Internet
    Size : 7176291
    License : GPL
    Signature : DSA/SHA1, Tue 25 Aug 2020 03:02:06 PM UTC, Key ID bd11a6aa914bdf7e
    Source RPM : awstats-7.7-2.centos.7+p18.0.27.0+t200424.1018.src.rpm
    Build Date : Fri 24 Apr 2020 03:19:44 AM UTC
    Build Host : bcos7x64.plesk.ru
    Relocations : /
    Packager : Plesk <info@plesk.com>
    Vendor : Plesk

     

    With Plesk's awstats the correct (working) awstats configuration in /etc/psa/psa.conf is the one indicated in this article (in the CentOS section, of course):

    # AWStats
    AAWSTATS_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

    Everything is fine now: I'm only wondering what I'm loosing (if any) using awstats 7.7-2 instead of 7.8-1...

    I have an hunch (but can't vow on that...) that me originally having the el7 repo version instead of the Plesk's repo version could derive from the fact that my Plesk installation was initially an Onyx one, eventually upgraded to Obsidian...

    Cheers and thanks from taking care of the issue,

    Sergio

    0
    Comment actions Permalink
  • Avatar
    Bulat Tsydenov

    Sergio Manzi

    Thank you for confirming that everything is fine now.

    To be honest, it's difficult to say what is the difference between 7.7 and 7.8 because even their official page with ChangeLog does not contain any information about 7.8 - https://awstats.sourceforge.io/docs/awstats_changelog.txt. 

    I think you had 7.8 version in the past because it is the version that is available in EPEL repo, Plesk Onyx uses awstats installed from OS repos. Starting from Obsidian, Plesk ships its own awstats package.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request