[How To] Configuring AwStats to show which countries the visitors are coming from?


By default AwStats does not show countries visitors are coming from. To enable this feature,  GeoIP plugin should be configured. Here is the information about this plugin from /etc/awstats/awstats.conf:

# Plugin: GeoIP
# Perl modules required: Geo::IP or Geo::IP::PurePerl (from Maxmind)
# Country chart is built from an Internet IP-Country database.
# This plugin is useless for intranet only log files.
# Note: You must choose between using this plugin (need Perl Geo::IP module
# from Maxmind, database more up to date) or the GeoIPfree plugin (need
# Perl Geo::IPfree module, database less up to date).
# This plugin reduces AWStats speed of 8% !

Usually, geoip.pm plugin coming with AwStats package.
But the Perl modules necessary for plugin work (Geo::IP or Geo::IP::PurePerl) should be installed.
You can get all necessary installation instructions and downloadable plugin files (for example, “Geo::IP::PurePerl Module” library) from here:


The plugin should be enabled in the main AwStats configuration files:


And the files that were already configured by Plesk for every domain which can be found in /usr/local/psa/etc/awstats/*.

The line that should be added into all these files looks like:

LoadPlugin=”geoip GEOIP_STANDARD /pathto/GeoIP.dat”

Latest GeoIP.dat can be found at http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz.

Note, it might take a couple of days for your stats to start accumulate the countries information.

update awstat for plesk

/usr/local/psa/admin/sbin/statistics –calculate-one –domain-name=DOMAIN.COM

Leave a comment