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

Follow

Comments

15 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

Please sign in to leave a comment.

Have more questions? Submit a request