AWstats GeoIP malfunctions for domains migrated from earlier versions

Refers to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 11.5 for Windows
  • Plesk 12.0 for Windows
  • Plesk 12.5 for Windows

Created:

2016-11-16 13:14:01 UTC

Modified:

2017-02-22 14:13:09 UTC

0

Was this article helpful?


Have more questions?

Submit a request

AWstats GeoIP malfunctions for domains migrated from earlier versions

Symptoms

  • AWStat is now showing countries information

  • GeoIP is not working in AWStats for the domains which was migrated from older Plesk versions.

Cause

AWstats GeoIP plugin was not installed or configured properly.

Resolution

  1. Install Geo::IP::PurePerl perl module which will be used for country plug-in.

    You may get the latest version from Perl website:

    http://search.cpan.org/search?query=Geo%3A%3AIP%3A%3APurePerl&mode=all

    Or just install it from Windows command line:

    ppm install http://trouchelle.com/ppm10/Geo-IP-PurePerl.ppd
  2. Install Geo::IPfree perl module which will be used for country plug-in.

    You may get the latest version from Perl website:

    http://search.cpan.org/search?query=Geo%3A%3AIPFree&mode=all

    Or just install it from Windows command line:

    ppm install http://trouchelle.com/ppm10/Geo-IPfree.ppd
  3. Download, unzip and install GeoIP.dat file from MaxMind web site into the geodb directory, for example in 'C:\\GeoIP' . Please note that to this file should be updated every month to get accurate statistics.

  4. Adjust file permission to allow IIS anonymous IUSR_<username> user read it. You may grant Read permission to Everyone

  5. Edit %plesk_dir%\\Additional\\AWStats\\wwwroot\\cgi-bin\\awstats.model.conf and enable geoip plugin:

    LoadPlugin="geoip GEOIP_STANDARD C:\\GeoIP\\GeoIP.dat"
  6. Recalculate statistics.

    5.1. To recalculate web statistics for a domain you need to use 2 commands like:

    %plesk_bin%"\\statistics.exe --calculate-one --domain-name testdomain.tld
    "%plesk_bin%"\\statistics.exe --generate-domain-webstat --domain-name testdomain.tld

    5.2 To calculate the statistics for the all domains, execute the following commands in the same order:

    "%plesk_bin%"\\dbclient.exe --direct-sql --sql="select name from domains" > c:\\output.txt
    for /F %i in (c:\\output.txt); do ("%plesk_bin%"\\statistics.exe --calculate-one --domain-name %i);
    for /F %i in (c:\\output.txt); do ("%plesk_bin%"\\statistics.exe --generate-domain-webstat --domain-name %i);
Have more questions? Submit a request
Please sign in to leave a comment.