The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Some problems customizing AWstats

Discussion in 'General Discussion' started by Kent Brockman, Apr 13, 2008.

  1. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,130
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi, I've installed AWstats locally (offline) in order to analyze more quickly and easily some stats.
    The case is that this has tought me a lot about functioning of AWstats that make me non-understand how it is implemented in cPanel.

    Here come what I seen plus my questions:

    1) When seeing the stats in my server, the page shown claims to be the AWstats 6.7 (build 1.892), but when I look to the source code, it clearly says

    Code:
    $REVISION='$Revision: 1.887 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
    $VERSION="6.6 (build $REVISION)";
    
    After making a search in all the server, I found that the engine awstats.pl is the only file with that name all along the server, so I don't understand what is happening or what kind of changes made cPanel to implement the stats. This awstats.pl is located at /usr/local/cpanel/src/3rdparty/gpl/awstats-6.6/wwwroot/cgi-bin/awstats.pl
    Where is the v6.7 note coming from? ( NOTE: WrapperScript="" )


    2) When you see the stats in the browser, some icon files are not found (os/bsd.png, os/psp.png, mime/flash.png, mime/jscript.png). They are not present at /usr/local/cpanel/base/images/awstats/browser/ but they are in the original folder /usr/local/cpanel/src/3rdparty/gpl/awstats-6.6/wwwroot/icon/browser/ . I solved this problem by copying the files from the install folder.

    Code:
    cp -u /usr/local/cpanel/src/3rdparty/gpl/awstats-6.6/wwwroot/icon/browser/*.*  /usr/local/cpanel/base/images/awstats/browser/
    cp -u /usr/local/cpanel/src/3rdparty/gpl/awstats-6.6/wwwroot/icon/os/*.*  /usr/local/cpanel/base/images/awstats/os/
    cp -u /usr/local/cpanel/src/3rdparty/gpl/awstats-6.6/wwwroot/icon/mime/*.*  /usr/local/cpanel/base/images/awstats/mime/
    cp -u /usr/local/cpanel/src/3rdparty/gpl/awstats-6.6/wwwroot/icon/flags/*.*  /usr/local/cpanel/base/images/awstats/flags/
    cp -u /usr/local/cpanel/src/3rdparty/gpl/awstats-6.6/wwwroot/icon/cpu/*.*  /usr/local/cpanel/base/images/awstats/cpu/
    cp -u /usr/local/cpanel/src/3rdparty/gpl/awstats-6.6/wwwroot/icon/clock/*.*  /usr/local/cpanel/base/images/awstats/clock/
    cp -u /usr/local/cpanel/src/3rdparty/gpl/awstats-6.6/wwwroot/icon/other/*.*  /usr/local/cpanel/base/images/awstats/other/
    
    I can understand that cPanel use awstats v6.6, but why were the files non-synced?


    3) Finally, I want to introduce some customizations to the .conf file, like default spanish language and so, but I really don't know where is located the real .conf file that cPanel is copying to the accounts. I've tried modifying the /usr/local/cpanel/src/3rdparty/gpl/awstats-6.6/wwwroot/cgi-bin/awstats.model.conf but I found out that it is not used as model to be copied for new accounts, and there is no other copy all around. Anybody knows how to workaround all this?


    Regards
    KB
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Regarding this particular issue (using Spanish language stats), this can be configured through WHM -> Languages -> Additional Language Config. Here, you can set AWStats (and Analog and Webalizer) to display in Spanish if the user's language is set to Spanish and so forth...
     
  3. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,130
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yep, I've already done that from the start, but my purpose in item 3 is narrowing much more the config: allowing only english/spanish pair for awstats. I found out that this may be done touching the config at /home/USERACCOUNT/tmp/awstats/awstats.DOMAINNAME.conf, but the idea is to allow every user to view the new config (i.e., new colours using another CSS settings, more detailed stats logging). I would like to know how to apply the new config for new accounts. For existing accounts I suppose I could reconfig all the existing .conf files with something like this (I still didn't tried because I don't know how to set the USERACCOUNT and DOMAINNAME variables):

    Code:
    replace -v OLDCONFIGSTRING NEWCONFIGSTRING -- /home/USERACCOUNT/tmp/awstats/awstats.DOMAINNAME.conf
    
     
Loading...

Share This Page