Updating to AWStats7.5.

   On November 11, I updated AWStats from 7.4 to 7.5, as I forgot to do it though I found AWStats7.5 when they released it in April. If you need How To, see ‘Updating to AWStats7.3’.

   At this point my ‘awstats.MyDomain.conf’ and the original ‘awstats.model.conf’ have the next differences.
LogFile="/var/log/httpd/mylog.log"
→ LogFile="x:/Apache24/logs/access.%YYYY-24.%MM-24.%DD-24"
   This setting gives the stats of yesterday when ‘awstats.bat’ runs.

SiteDomain=""
→ SiteDomain="MyDomain"

HostAliases="localhost 127.0.0.1 REGEX[myserver\.com$]"
→ HostAliases="MyDomain"

DNSLookup=2
→ DNSLookup=0
   I use GeoIP plugin, so I set DNSLookup=0.

AllowFullYearView=2
→ AllowFullYearView=3

AllowAccessFromWebToFollowingIPAddresses=""
→ AllowAccessFromWebToFollowingIPAddresses="192.168.xxx.1-192.168.xxx.123.255"

#LoadPlugin="geoip GEOIP_STANDARD /pathto/GeoIP.dat"
→ LoadPlugin="geoip GEOIP_STANDARD /pathto/GeoIP.dat"

#LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /pathto/GeoIPCity.dat"
→ LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /pathto/GeoIPCity.dat"

   By the way, I also forgot to write HowTo use GeoIP plugin on AWStats on Windows. The conf says the plugin requires MODULES: Geo::IP or Geo::IP::PurePerl. So add Geo-IP package to ActivePerl by Perl Package Manager Index (PPM).
[Note]: The package name is not ‘Geo::IP’ but ‘Geo-IP’ on ActivePerl.

   GeoIP plugin uses GeoIP Legacy Country and City. You need to get them. You can find GeoLite Legacy Downloadable Databases here and see this page about the instructions of GeoIP Legacy Country Database Installation.

   Since the beginning of GeoIP using I did the steps about installing GeoIP Legacy Country and City manually. But now, as having CygWin on my server, I use a batch file named ‘GeoIP_DATA.bat’ like the below. Run this on the eighth of every month by Task Scheduler because this page says ‘They are updated on the first Tuesday of each month’.
[GeoIP_DATA.bat]

@echo off

pushd Drive_DC:\awstats\wwwroot\cgi-bin
x:\cygwin\bin\wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
x:\cygwin\bin\wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
x:\cygwin\bin\bash --login -i -c "gunzip -c /cygdrive/Drive_DC/awstats/wwwroot/cgi-bin/GeoIP.dat.gz > /cygdrive/Drive_DC/awstats/wwwroot/cgi-bin/GeoIP.dat"
x:\cygwin\bin\bash --login -i -c "gunzip -c /cygdrive/Drive_DC/awstats/wwwroot/cgi-bin/GeoLiteCity.dat.gz > /cygdrive/Drive_DC/awstats/wwwroot/cgi-bin/GeoIPCity.dat"
exit

   Customize geoip.pm and geoip_city_maxmind.pm. (Location:Drive_DC:\awstats\wwwroot\cgi-bin\plugins).
 #!/usr/bin/perl  →  #!Drive_SV:/perl/bin/perl

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.