AWstat is a free real-time logfile analyzer to get advanced statistics ..
Here I will explain how to install it by downloading your version of awstat.
Untar the package by issuing the below command,
Here I will explain how to install it by downloading your version of awstat.
Untar the package by issuing the below command,
tar -zxvf /var/Packages/awstats-7.0.tar.gz
mv awstats-7.0 /usr/local/awstats
Enter a new virtual hosts in the apache configuration,
Enter a new virtual hosts in the apache configuration,
vim /etc/httpd/conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot “/usr/local/awstats/wwwroot”
ServerName awstats.test.com
ErrorLog “logs/awstats-error_log”
CustomLog “logs/awstats-access_log” common
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot “/usr/local/awstats/wwwroot”
ServerName awstats.test.com
ErrorLog “logs/awstats-error_log”
CustomLog “logs/awstats-access_log” common
Alias /awstatsclasses “/usr/local/awstats/wwwroot/classes/”
Alias /awstatscss “/usr/local/awstats/wwwroot/css/”
Alias /awstatsicons “/usr/local/awstats/wwwroot/icon/”
ScriptAlias /awstats/ “/usr/local/awstats/wwwroot/cgi-bin/”
<Directory “/usr/local/awstats/wwwroot”>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Open the awstats.domain.conf in your favourite text editor,
vim /etc/awstats/awstats.domain.conf
LogFile=”/var/www/logs/ssl_access_cus_log”
SiteDomain=”domain”
SiteDomain=”domain”
ssl_access_cus_log should log in this format
LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-agent}i\”" combined
cd tools/
perl awstats_configure.pl
/usr/local/awstats/tools/awstats_updateall.pl now
perl awstats_configure.pl
/usr/local/awstats/tools/awstats_updateall.pl now
log path
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=domain.com
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=domain.com
For country tracking ..
Download the GeoIP.tar.gz by using the below command,
wget http://maxmind.com/download/geoip/api/c/GeoIP.tar.gz
tar xzvf GeoIP.tar.gz
cd GeoIP*
./configure && make && make install
cd ..
rm -rfv GeoIP*
wget http://maxmind.com/download/geoip/api/c/GeoIP.tar.gz
tar xzvf GeoIP.tar.gz
cd GeoIP*
./configure && make && make install
cd ..
rm -rfv GeoIP*
Now install the below mentioned perl module
Geo::IP
Geo::IP
Change /etc/awstats/awstats.domain.conf file for enabling GEOIP by using sed command as mentioned below,
sed -i ‘s/#LoadPlugin=”geoip GEOIP_STANDARD \/pathto\/GeoIP.dat”/LoadPlugin=”geoip GEOIP_STANDARD
\/usr\/local\/share\/GeoIP\/GeoIP.dat”/’ /etc/awstats/*.conf
sed -i ‘s/#LoadPlugin=”geoip GEOIP_STANDARD \/pathto\/GeoIP.dat”/LoadPlugin=”geoip GEOIP_STANDARD
\/usr\/local\/share\/GeoIP\/GeoIP.dat”/’ /etc/awstats/*.conf
Every thing is set, Restart apache and point your browser url to http://awstat.domain.com/awstats/awstats.pl?config=domain
Now you can see the realtime web statistic on your browser.
All datas will be in the “/var/lib/awstats” folder as .txt file, so take this folder as a backup,
Thanks for reading,
Cheers /-
Now you can see the realtime web statistic on your browser.
All datas will be in the “/var/lib/awstats” folder as .txt file, so take this folder as a backup,
Thanks for reading,
Cheers /-
No comments:
Post a Comment