Web Hosting Talk







View Full Version : How to make awstats update automatically and from browser


ApplePro
01-10-2008, 01:50 PM
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).

ApplePro
01-10-2008, 02:24 PM
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

jasonBV
01-10-2008, 04:38 PM
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

ApplePro
01-11-2008, 06:15 AM
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. :)

ApplePro
01-16-2008, 04:38 PM
Anyone please?

Steve_Arm
01-16-2008, 06:32 PM
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

blessen
01-16-2008, 09:10 PM
Yes, put it in cron.

Use the "crontab -e" command on shell or use the Control panel features to add the command into cron