How do I enable Awstats in WHM/Cpanel and enable logs manually

One of my client requested to use awstats rather than webalizer ( the default log stats viewer) on his server. Awstats has freely available and can install this perl scripts on any dedicated/vps servers.

Here is the steps to go,

1. First thing you need to login whm/Cpanel interface using root account and WHM >> Main >>Statistics Software Configuration
a. Check on awstats under “Generators Configuration”
b. tick Allow all users to change their web statistics generating software.
c. disable all other stats log viewer.

Follow the screen below,

Enable the option for users to generate the log file as they wish, Follow the screen,

You you may need to generate the log files manually for the initial verification,

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.

You can now see that “last update” option enabled in cPanel>>Logs >>Awstats
If it is not there, do the following ,
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
4. It should be set to AllowToUpdateStatsFromBrowser=1
5. If not, edit the file and save.
6. restart cpanel : service cpanel restart