awstats not working...

Discussion in 'ISPConfig 3 Priority Support' started by rob_morin, Nov 28, 2018.

  1. rob_morin

    rob_morin Member HowtoForge Supporter

    Hello... So i had a client ask why his awstats are not working. I went to the domain in question in ispconfig. I set a password, as i thought maybe it was not enabled. I then wait 5 mins went to domain /awstats i log in and only see this month in drop down and the page says "domain refused to connect"
    What should i be looking for?
    All awstats files exist in their proper places and the ispconfig crons run fine...
    When i look in /var/lib/awstats
    i do not see any files related to the domain in question.
    What should i look at?
    Thanks...
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Take a look at the error.log of the website, maybe you find an error there when you try to use awstats.
     
  3. rob_morin

    rob_morin Member HowtoForge Supporter

    No errors
     
  4. rob_morin

    rob_morin Member HowtoForge Supporter

    How would i run the awstats command manually so that i may see errors
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The command should be:

    awstats_buildstaticpages.pl -month=11 -year=2018 -update -config=mydomain.com -lang=en -dir=/var/www/domain.com/web/stats -awstatsprog=/path/to/awstats.pl
     
  6. rob_morin

    rob_morin Member HowtoForge Supporter

    So after i ran that i checked the stats dir and there were files in it, but i get same error owhen trying to get to domain.com/stats however if it go to domain.com/stats/awstats.domain.com.html i see some stats but all the graphics/icons are broken..
     
  7. rob_morin

    rob_morin Member HowtoForge Supporter

  8. Brett Wilton

    Brett Wilton Member HowtoForge Supporter

    I manually put the link in on my CentOS servers in the web directory for the icons
    awstatsicons -> /usr/share/awstats/wwwroot/icon
     
  9. rob_morin

    rob_morin Member HowtoForge Supporter

    Ok so linking....
    ln -s /usr/share/awstats/icon awstats-icon within the webroot fixed, but now i have to do for all domains?????
    And he only has Nov stats...
     
  10. rob_morin

    rob_morin Member HowtoForge Supporter

    So the stats are not running automatically everyday....
    I need to resolve this...
    Please provide the steps to troubleshoot this issue form the beginning again.
    Thanks..
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Check in the ISPConfig interface that the path to the buildstaticpages script under system > server config matches the location of that script on the hard disk of the server. Then check the root crontab to ensure that the ispconfig cron.sh script is not disabled.
     
  12. rob_morin

    rob_morin Member HowtoForge Supporter

    cron:

    * * * * * /usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    * * * * * /usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done

    awstats:
    /usr/share/awstats/tools/awstats_buildstaticpages.pl is in place:

    [email protected]:/home/rob# /usr/share/awstats/tools/awstats_buildstaticpages.pl
    ----- awstats_buildstaticpages 1.2 (build 20140126) (c) Laurent Destailleur -----
    awstats_buildstaticpages allows you to launch AWStats with -staticlinks option
    to build all possible pages allowed by AWStats -output option.

    Usage:
    awstats_buildstaticpages.pl (awstats_options) [awstatsbuildstaticpages_options]

    where awstats_options are any option known by AWStats
    -config=configvalue is value for -config parameter (REQUIRED)
    -update option used to update statistics before to generate pages
    -lang=LL to output a HTML report in language LL (en,de,es,fr,...)
    -month=MM to output a HTML report for an old month=MM
    -year=YYYY to output a HTML report for an old year=YYYY

    and awstatsbuildstaticpages_options can be
    -awstatsprog=pathtoawstatspl AWStats software (awstats.pl) path
    -dir=outputdir Output directory for generated pages
    -diricons=icondir Relative path to use as icon dir in <img> links
    -builddate=%YY%MM%DD Used to add build date in built pages filenames
    -staticlinksext=xxx Build pages with .xxx extension (default .html)
    -buildpdf[=pathtohtmldoc] Build a PDF file after building HTML pages.
    Output directory must contains icon directory
    when this option is used (need 'htmldoc')

    New versions and FAQ at http://www.awstats.org
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Next you can try to run the awstats cron plugin directly from shell as root:

    php cron_debug.php --cronjob=150-awstats.inc.php

    to check if the stats get generated then or if there are any errors on the shell when you execute it.
     
  14. rob_morin

    rob_morin Member HowtoForge Supporter

    So i run that and this is output and stats are NOT updated.....

    [email protected]:/usr/local/ispconfig/server# php cron_debug.php --cronjob=150-awstats.inc.php
    PHP Warning: Declaration of db::query($sQuery = '') should be compatible with mysqli::query($query, $resultmode = NULL) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 961
    finished.
     

Share This Page