You can follow the steps below (in cPanel server) to view Awstats directly through browser.
1- Download awstats from http://awstats.sourceforge.net.
wget http://prdownloads.sourceforge.net/awstats/awstats-6.7.tar.gz
2- Uncompress it.
tar -zxf awstats-6.7.tar.gz
This can be uncompressed to domain’s cgi-bin folder.
That is to /home/username/public_html/cgi-bin/awstats-6.7
3- Change the ownership to the username.
chown -R username.usernameĀ /home/username/public_html/cgi-bin/awstats-6.7
4- Copy the contents of awstats-6.7/wwwroot/cgi-bin to the domains cgi-bin folder.(this includes awstats.pl, awstats.model.conf, and the lang, lib and plugins sub-directories).
cp -prf /home/username/public_html/cgi-bin/awstats-6.7/wwwroot/cgi-bin/* /home/username/public_html/cgi-bin/
5- Copy the awstats-6.7/wwwroot/icon folder and its contents to the document root.
cp -prf /home/username/public_html/cgi-bin/awstats-6.7/wwwroot/icons/ /home/username/public_html/
6- make sure that the first line of awstats.pl is #!/usr/bin/perl and edit it if necessary to the correct path to perl in server.
7- Copy awstats.model.conf file into a new file named awstats.domainname.conf. This file must be stored in the cgi-bin directory of the domain.
cp -p /home/username/public_html/cgi-bin/awstats.model.conf /home/username/public_html/cgi-bin/awstats.domainname.conf
8- Edit this new config (awstats.domainname.conf) file.
1- Change LogFile value with full path to the web server log file.
LogFile=”/usr/local/apache/domlogs/domain.com”
2- Change DirIcons parameter to reflect relative path of icons directory.
DirIcons=”/icons”
3- Edit SiteDomain parameter with the name of the domain.
SiteDomain=”www.domain.com”
4- Change DirData to use the Statics file.
DirData=”/home/user/tmp/awstats/”
5- Set AllowToUpdateStatsFromBrowser=1,Ā so stats can be updated through browser.
6- Save the config file.
9- Now try to access awstats using the URL :
Ā Ā http://www.domain.com/cgi-bin/awstats.pl?config=domain.com
10- Click on “Update now” to update the stats.