Results 1 to 7 of 7
-
01-10-2008, 01:50 PM #1WHT Addict
- Join Date
- Oct 2005
- Posts
- 104
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).
-
01-10-2008, 02:24 PM #2WHT Addict
- Join Date
- Oct 2005
- Posts
- 104
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
-
01-10-2008, 04:38 PM #3Newbie
- Join Date
- Jul 2005
- Posts
- 22
-
01-11-2008, 06:15 AM #4WHT Addict
- Join Date
- Oct 2005
- Posts
- 104
-
01-16-2008, 04:38 PM #5WHT Addict
- Join Date
- Oct 2005
- Posts
- 104
Anyone please?
-
01-16-2008, 06:32 PM #6Web Hosting Master
- 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
-
01-16-2008, 09:10 PM #7Web Hosting Master
- 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 cronBlessen Cherian
Follow me on twitter.com/blessenonly
Two decade in Web Hosting Industry