1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Awstats + Centos /icons is not working

Discussion in 'Plesk for Linux - 8.x and Older' started by gomibaya, Dec 22, 2006.

  1. gomibaya

    gomibaya Guest

    0
     
    The awstats package in Centos4 and Plesk 8.1 used an alias dir for the icons:

    /awstats-icon

    But when the awstats contents is generated, the icon dir is different, instead /awstats-icon is /icon


    To fix this issue, is neccesary to change this file:

    /usr/share/awstats/awstats_buildstaticpages.pl

    and change

    my $DirIcons='';

    with

    my $DirIcons='/awstats-icon';
     
  2. nars

    nars Guest

    0
     
    Good fix, thank you for sharing. Indeed this seems the best fix for the problem, just adding a new alias for /icons as said in some other threads is not a "clean way" imo as there is already a /awstats-icon alias... and just changing awstats config in /usr/local/psa/etc/awstats/ is not also a good fix as plesk may overwrite configuration... it is a shame how swsoft did this mistake and didn't released an hotfix to fix it yet, in fact latest hotfix is supposed to fix it but it doesn't... :(
     
  3. JLChafardet

    JLChafardet Regular Pleskian

    26
    57%
    Joined:
    Feb 20, 2004
    Messages:
    379
    Likes Received:
    0
    Location:
    Caracas - Venezuela
    just for the information of anyone who have this same problem.

    my icons werent showing up (403 error)

    the fix is simple, comment the allow from local(127.0.0.1)
    Code:
    Alias /awstats/icon/ /var/www/awstats/icon/
    
    ScriptAlias /awstats/ /var/www/awstats/
    <Directory /var/www/awstats/>
            DirectoryIndex awstats.pl
            Options ExecCGI
            order deny,allow
    [b]#       deny from all[/b]
            allow from all [b]##127.0.0.1[/b]
    </Directory>
    
    #Alias /css/ /var/www/awstats/css/
    #Alias /js/ /var/www/awstats/js/
    
    
     
  4. balu

    balu Guest

    0
     
    From my /etc/cron.daily/50plesk-daily that I had to rename anyway, because Debian doesn't allow files with dots in the cron.daily directory:

    ## BALU: needed for awstats to allow changing of config dir
    export AWSTATS_ENABLE_CONFIG_DIR=1

    ## BALU: Do some magic perl to replace DirIcons with the correct values
    /usr/bin/perl -pi -e 's%DirIcons="/icon"%DirIcons="/awstats-icon"%i' /opt/psa/etc/awstats/awstats*.conf

    ## BALU: Our customers want German stats
    /usr/bin/perl -pi -e 's%^Lang="auto"%Lang="de"%i' /opt/psa/etc/awstats/awstats*.conf
    ...

    I have to wait for the cron run tomorrow to see if it works though ;)

    Balu
     
  5. aaabyss

    aaabyss Guest

    0
     
    What/where is the file this code is in please?

    TIA
     
  6. JLChafardet

    JLChafardet Regular Pleskian

    26
    57%
    Joined:
    Feb 20, 2004
    Messages:
    379
    Likes Received:
    0
    Location:
    Caracas - Venezuela
    the file is located at /etc/httpd/conf.d/awstats.conf

    make sure you make backup of your original file first.
     
  7. BeeGirl033

    BeeGirl033 Guest

    0
     
    I have the same error on my CentOs4.4 plesk 8.1.1
     
  8. amarce

    amarce Basic Pleskian

    23
     
    Joined:
    Jun 28, 2004
    Messages:
    33
    Likes Received:
    0
    Better solution

    I think that it would be better than editing the .pl file that generates al the awstats files, would be editing the template that is being used to generate those files.

    To edit that template, you should edit the file /etc/awstats/awstats.model.conf and chenge the line that says:

    DirIcons="/icon"

    to

    DirIcons="/awstats-icon"

    Best regards,

    Arnau Marcé
    VPS - Servidores Dedicados - www.silicontower.net
     
Loading...