Awstats mod - uses dynamic pages (non static)

Discussion in 'Tips/Tricks/Mods' started by djtremors, Nov 8, 2006.

  1. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    Package update AWstats 6.9

    I finally found the time to create an update for the AWstats package created by djtremors. The updates included in this package:

    • Updated to AWstats 6.9
    • Added the /js/ alias to the generic part of the Apache config, so you can include /js/awstats_misc_tracker.js in any page on any website if you like to create detailed stats like screensize: http://awstats.sourceforge.net/docs/awstats_faq.html#SCREENSIZE
    • Updated the awstats creation script to adhere to the latest ISPConfig 2.2.32 setup, like to use the super account to view any site statistics
    • Removed the annoying two times authentication when trying to open the stats with https.
    • Improved install.sh script:
    • In the setup script, adapted the crontab to not interfere with webalyser entry.
    • The root crontab is during setup inserted at the correct location (based on Ubuntu 8.04 LTS)
    • The setup script can now be run multiple times without creating a messy apache.conf file
    • Fix permissions, to ensure the script runs nightly

    The version is only tested on Ubuntu 8.04, ISPConfig 2.2.32. You can find the new package at http://www.tiempo.nl/ispconfig_awstats

    Martin
     
    Last edited: Sep 9, 2009
  2. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    In order to use the /js/awstats_misc_tracker.js option in the package I created, I overlooked an .htaccess restriction in the directory /home/admispconfig/web/ispc.awstats/js (you get this directory when installing).
    In the parent directory, an .htaccess file is requesting you to enter a password, which is a limitation you need to remove in order to allow other websites to use the script.

    The solution is really simple, and is added to the package you can download. The fix is to create an .htaccess file in /home/admispconfig/web/ispc.awstats/js, containing
    Code:
    Satisfy Any
    Order Deny,Allow
    Allow from All
     
    Last edited: Aug 30, 2009
  3. SupuS

    SupuS Member HowtoForge Supporter

    I tested this version on ISPConfig 2.2.33 and it works as expected... very well :)

    In web configuration is necessary to set NONE in options => webalizer statistics.

    I have a lot of webs and I don't want to allow users to change this options so in file:

    /root/ispconfig/scripts/lib/config.lib.php

    I comented out:

    Code:
      ////////////// Web Statistics ////////////////////
      $stats_alias = "";
    
       if($web["webalizer_stats"] == 2){
         $stats_alias = "Alias /stats \"".$document_root."/awstats\"";
       } elseif ($web["webalizer_stats"] == 1) {
         $stats_alias = "Alias /stats \"".$document_root."/webalizer\"";
       }
    If this section is commented out than is not necessary to set options => webalizer statistics. After edit config.lib.php don't forget to reload vhost file for example by changing and saving some web option.

    SupuS
     
  4. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    hehe good work Martin, thanks for keeping it up to date as I've been working on other mods and projects etc. :)
     
  5. psychop

    psychop New Member

    Reading all these posts set up awstats 6.9 and managed to update all sites only once.
    Am using ISPConfig 2.35.

    How set up to be auto updated every day?

    Tnx again all.
     
  6. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    crontab does it.


    0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/awstats.php > /var/log/awstats.log 2>&1 &


    this file not only creates the password files and adds the files required for new sites but also processes the logs.
     
  7. psychop

    psychop New Member

    my line is like this:
    0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/awstats.php &> /dev/null

    but all my pages were last updated on 15.4.2010

    One page has only awstats.mypage.com.txt file that it says is part of log and no html files that other have...

    All is very weird.

    Changed settings in awstats.shared.conf file for manual update via browser and alsno no effect
     

Share This Page