Thursday, January 20, 2011

HOWTO Enable AWStats Updating from Cpanel

Processing stats and logs is resource-intensive. Sometimes, if the processor load is high or if there is too much memory usage, the virtualization software will kill off a running process to keep your VPS within it's resource limits.

Updating Manually

You can use SSH to update the stats by issuing the following command:

/scripts/runweblogs [username]]

where [username] is the cPanel username you wish to update.

Updating Through cPanel

Sometimes, it may be easier to just enable your cPanel user accounts to update manually.

Login to WHM, then select Server Configuration -> Tweak Settings.
Scroll down to Stats and Logs.
Check the box "Allow users to update Awstats from cPanel"

If The Link Doesn't Appear

The link for "Update Now" in AWStats will be located at the top, next to "Last Update".
However, it may not show immediately. You may need to manually run the stats using the "Updating Manually" instructions above.
You can also verify that the setting is actually enabled, by checking the AWStats Configuration File for a particular user.

1. Login via SSH as root
2. cd /home/username/tmp/awstats
3. grep AllowToUpdateStatsFromBrowser awstats.example.com.conf
4. It should be set to AllowToUpdateStatsFromBrowser=1
5. If not, edit the file and save.
6. restart cpanel : service cpanel restart

No comments:

Post a Comment