AWStats Installer

Discussion in 'Tips/Tricks/Mods' started by jnsc, Oct 6, 2006.

  1. jnsc

    jnsc rotaredoM Moderator

    Hello,

    I made a little installer for AWStats, It's a first draft so do not use on a production server. I would like to have some feedback, so don't hesitate to post your questions.

    For more information go to this URL http://jnsc.ch/ispconfig.php

    Regards
     
    Last edited: Sep 15, 2008
  2. falko

    falko Super Moderator ISPConfig Developer

    I'll test it in the next days. :)
     
  3. jnsc

    jnsc rotaredoM Moderator

    Thank's that would be nice
     
  4. TobiasTM

    TobiasTM ISPConfig Developer ISPConfig Developer

    Hi,

    it´s great, that you build a package :)

    I will test it in the next day´s, too and tell you how it works.

    ;-)
     
  5. bogdanbrudiu

    bogdanbrudiu New Member

    crontab problem

    Hi,
    I am having problems making it work.
    I have installed the package and it generats the /awstats folder and etc/awstats conf files, also the .passwd files...but no stats.
    I have installed awstats (apt-get install awstats) but i do not know what to add in crontab for awstat to generate the reports.
    Can you please help me?
     
  6. jnsc

    jnsc rotaredoM Moderator

    You do not need to install awstats by apt-get, because the installer copy the needed files to /home/admispconfig/ispconfig/tools

    Normally the script adds the cron automaticly, chek that you have
    Code:
    0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/awstats.php &> /dev/null
    
    in your crontab (crontab -e)

    If you run /root/ispconfig/php/php /root/ispconfig/scripts/shell/awstats.php manually (which can be long) do you have an error message?
     
  7. bogdanbrudiu

    bogdanbrudiu New Member

    I have runde manualy /root/ispconfig/php/php /root/ispconfig/scripts/shell/awstats.php and I do not get error..
    bot no stats also..
    in /awstats a index.php file gets generated
    mainframe:/var/www/www.xceed.ro/web/awstats# cat ./index.php
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <body>
    <?php
    $dir = ".";

    if( $dh = opendir($dir)) {
    while (($file = readdir($dh)) !== false) {
    $pattern = 'awstats\..*\.[0-9]{4}-[0-9]{2}\.html';
    if (ereg($pattern, $file)) {
    echo "<a href=\"$file\">$file</a><br />";
    }
    }
    }
    ?>
    </body>
    </html>
    but when i try to see it in a browser is empty (the awstats folder does not contain file matching awstats\..*\.[0-9]{4}-[0-9]{2}\.html)
    the only files there are index.php and .htaccess
    I did not figure out from your scripts where is awstats called to generate the reports from the config files?
     
  8. jnsc

    jnsc rotaredoM Moderator

    Ok,
    I figured out the problem, it was my fault, I commented out one line in order to make a test and I forgot to remove the comment.

    Just edit line 172 of /root/ispconfig/scripts/shell/awstats.php and remove the leading // of this line (it begins with $message .= exec )

    Code:
    vi +172 /root/ispconfig/scripts/shell/awstats.php
    I'm really sorry, I will release a new version wich removes this Bug.
     
    Last edited: Oct 17, 2006
  9. bogdanbrudiu

    bogdanbrudiu New Member

    it works ok now :)
    thankyou great tool it is mutch beater then webalizer reports
     
  10. falko

    falko Super Moderator ISPConfig Developer

    Last edited by a moderator: Oct 19, 2008
  11. jnsc

    jnsc rotaredoM Moderator

    Nice Thank you.
     
  12. TobiasTM

    TobiasTM ISPConfig Developer ISPConfig Developer

    It works great - there are no bugs.... (until now :p )
    How can I change the language of awstats ?

    I think that it is interesting how to change the language:
    Code:
    [B]Open File[/B]
    /etc/awstats/awstats.shared.conf
    
    [B]Edit line 891[/B]
    put in here your country-code (listed in the lines above)
    a.e.: [I]Lang="de"[/I]
    
    [B]Save file and quit editor[/B]
    
    [B]restart the awstats-script with the command:[/B]
    /root/ispconfig/php/php /root/ispconfig/scripts/shell/awstats.php
     
    Last edited: Oct 18, 2006
  13. jnsc

    jnsc rotaredoM Moderator

    Nice to know that it works nice until now :)

    I was thinking about to set the language on a per user basis, maybe by looking what language is set in the ISPConfig DB.
     
  14. TobiasTM

    TobiasTM ISPConfig Developer ISPConfig Developer

    I understand this idea, but at my server this didn´t work right (language).

    ´cause of this I changed this one entry ;)
     
  15. jnsc

    jnsc rotaredoM Moderator

    It didn't work because I didn't implement it yet :)
    But maybe if I have a little bit more time, I will implement it.
     
  16. TobiasTM

    TobiasTM ISPConfig Developer ISPConfig Developer

    okay :D

    and it works, and works, and works...
     
  17. Herbert

    Herbert New Member

    After changing the install.sh i'm tested with CentOs 4.3 and it works..
    Nice work.
     
  18. mkurz

    mkurz New Member

    Thank you

    I have installed your AWStats package, it works, thank you!
    Greetings, Martin :)
     
  19. jnsc

    jnsc rotaredoM Moderator

    Thank's, it's really nice to get good feedback's. :)
     
  20. boatrsp

    boatrsp New Member

    AWStats Installer on Mandriva

    I installed your package on Mandriva 2006, and had to adapt the scripts for the proper Apache configuration path, which is /etc/httpd/conf. I can send you the diffs if you want.

    The scripts run fine, .htaccess, .htpasswd and stat pages get created. I have just one remaining issue, which is an 403 Forbidden error on the resulting directory/pages. Any idea why this error would show up?

    **update**
    Works fine now... forgot to edit out some cgi-bin directives from the Mandriva AWStats package...

    **update 2**
    One little problem to report: the color bars in the reports are nor colored...

    Thank you for the package! :)
     
    Last edited: Oct 26, 2006

Share This Page