
31-03-11, 03:32 PM
|
|
Junior Member
|
|
Join Date: Jun 2010
Posts: 12
|
|
Installing AWStats
Installing AWStats
If you want to access the Awstats from the cpanel then it is necessary that you enable following setting from WHM:
WHM >> Tweak Setting >> Stats Programs tab >> Enable Awstats stats
And If you wish to access Awstats from outside of the cpanel then just need to follow the steps below:
1) First you need to Download awstats by executing following command
wget http://awstats.sourceforge.net/files/awstats-7.0.tar.gz
2) Then Uncompress awstats-7.0.tar.gz by executing following command
tar -xzvf awstats-7.0.tar.gz
3) Next Copy the folder awstats-7.0 to the user cgi-bin directory this can include folders like awstats.pl, awstats.model.conf, and the lang, lib and plugins sub-directories
4) You can also try editing the first line of awstats.pl file that is
#!/usr/bin/perl to #!/usr/local/bin/perl
5) Once we complete the above steps then just move icon of AWStats, sub-directories and its content into a directory that is readable by our web server, say for example you can move it to the path say /home/username/public_html/foldername
6) Then copy awstats.model.conf file into a new file called awstats.myvirtualhostname.conf which must be stored in /home/user/public_html/cgi-bin folder.
7) Then Edit this new config file with our own setup as follows:
- LogFile value with LogFile="/usr/local/apache/domlogs/domain.com").
- The LogFormat has the value "1" (which means "NCSA apache combined/ELF/XLF log format").
- Change DirIcons parameter to reflect relative path of icon directory where you specified icon of AWStats, sub-directories and its content
(DirIcons="/foldername")
- Then you need to edit the SiteDomain parameter with yourthe main domain name or the intranet web server name used to reach the web site to analyze
- Next IMPORTANT thing is to Change DirData to use the same Statics file than that of Cpanel Awstats and to make sure that we do not loose any entry.
(DirData="/home/user/tmp/awstats/")
8.) Once we follow all the steps then we can access AwStats by the URL:
domain.com/cgi-bin/awstats.pl?config=domain.com
9.The statics of AwStats will refreshed every 24 Hours.
All done but one thing that we must always remember before installing anything is its requirements.
To use AWStats CGI script, you need the following requirements:
* Inorder to run awstats, from command line, the operating system must be able to run perl scripts (.pl files).
* Perl module "Encode" must be available.
* To run awstats as a CGI (for real-timestatistics), the web server must be able for running such scripts.
You are now ready to use your AWSTATS....
__________________
Jovanna
|