Results 1 to 7 of 7
  1. #1

    How to make awstats update automatically and from browser

    Hello,

    I've installed awstats on my Linux server and awstats module for Webmin.

    I configured everything and it works, but to update awstats report, I need to do following:

    - login into Webmin and click "Update" in Awstats module menu.
    - login to serverthrough SSH and run these commands:
    cd /home/re/
    perl /home/re/awstats/awstats.pl -config=www.mysite.com -output -staticlinks > /home/re/awstats/awstats.mysite.html

    then I can see upadated statistics from my browser.


    But how can I automate this? I guess I should try to put some script into the Cron.

    Could you give me sample text of such script?


    Another question is I set "Enable Update From Browser" option to "1", but I can't see "Update" link in browser (it worked on my last server with cPanel installed).

  2. #2
    By the way, command which Webmin runs to update stats is:
    /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.mysite.com -configdir=/etc/awstats

  3. #3
    Quote Originally Posted by ApplePro View Post
    By the way, command which Webmin runs to update stats is:
    /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.mysite.com -configdir=/etc/awstats
    0 1 * * * /path/to/awstats/tools/awstats_updateall.pl now >/dev/null 2>&1

  4. #4
    Quote Originally Posted by jasonBV View Post
    0 1 * * * /path/to/awstats/tools/awstats_updateall.pl now >/dev/null 2>&1
    Thanks for answer, bur what should I do with this command? Put it in Cron?

    And what will this command do? Update all websites? I have just one website on my server.

  5. #5
    Anyone please?

  6. #6
    Join Date
    Jan 2006
    Location
    Athens, Greece
    Posts
    1,481
    Yes in your cronjob file

    0 1 * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.mysite.com -configdir=/etc/awstats >/dev/null 2>&1

  7. #7
    Join Date
    Aug 2003
    Location
    Gods Own Country
    Posts
    892
    Yes, put it in cron.

    Use the "crontab -e" command on shell or use the Control panel features to add the command into cron
    Blessen Cherian
    Follow me on twitter.com/blessenonly
    Two decade in Web Hosting Industry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •