Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

How to configure GeoIP plugin for Plesk AWStats

 
centosdebiandomainsforumshttps

Question

How to configure AWStats to show visitor's country?

Answer

By default, AWStats does not show visitors by countries.

If you wish to see this functionality in AWStats for Plesk, please vote for this feature on Plesk UserVoice:

  • https://plesk.uservoice.com/forums/184549-feature-suggestions/suggestions/40497196

 

To enable this feature manually, configure the GeoIP plugin as follows:

 

For Plesk on CentOS/RHEL-based distributions

 

  1. Connect to your Plesk server via SSH.

  2. Install perl-CPAN package:

    # yum install perl-CPAN

  3. Install the GeoIP module using these two commands:

    # perl -MCPAN -e "install Geo::IP::PurePerl"

    # perl -MCPAN -e "install Geo::IP"

  4. Run these commands to uncomment the plugin in AWStats configuration files:

    # /bin/sed -ire '/GeoIP.dat/ s/^#//' /etc/awstats/awstats.conf

    # /bin/sed -ire '/GeoIP.dat/ s/^#//' /etc/awstats/awstats.model.conf

  5. Run these commands to correct the path:

    # /bin/sed -i 's//pathto/GeoIP.dat//usr/share/GeoIP/GeoIP.dat/g' /etc/awstats/awstats.conf

    # /bin/sed -i 's//pathto/GeoIP.dat//usr/share/GeoIP/GeoIP.dat/g' /etc/awstats/awstats.model.conf

  6. Run this command to uncomment the line for all existing domains which are using AWstats:

    # for file in /usr/local/psa/etc/awstats/*; do /bin/sed -ire '/GeoIP.dat/ s/^#//' "$file"; echo "$file is updated"; done

  7. Run this command to correct path to GeoIP plugin:

    # for file in /usr/local/psa/etc/awstats/*; do /bin/sed -i 's//pathto/GeoIP.dat//usr/share/GeoIP/GeoIP.dat/g' "$file"; echo "$file is updated"; done

  8. Recalculate web statistics for all existing domains:

    # plesk sbin statistics --generate-all-webstat

    # plesk sbin statistics --calculate-all

 

For Plesk on Debian/Ubuntu-based distributions

 

  1. Connect to your Plesk server via SSH.

  2. Check if the make utility is installed on the server:

    # which make

    If this command's output is empty, install the required package:

    # apt-get install make

  3. Install the GeoIP module:

    # perl -MCPAN -e "install Geo::IP::PurePerl"

    # perl -MCPAN -e "install Geo::IP"

  4. Run these commands to uncomment the plugin in AWStats configuration files:

    # /bin/sed -ire '/GeoIP.dat/ s/^#//' /etc/awstats/awstats.conf

    # /bin/sed -ire '/GeoIP.dat/ s/^#//' /etc/awstats/awstats.model.conf

  5. Run this command to uncomment the line for all existing domains which are using AWstats:

    # for file in /usr/local/psa/etc/awstats/*; do /bin/sed -ire '/GeoIP.dat/ s/^#//' "$file"; echo "$file is updated"; done

  6. Recalculate web statistics for all existing domains:

    # plesk sbin statistics --generate-all-webstat

    # plesk sbin statistics --calculate-all

 

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Exploring Plesk’s Added Value Solutions So Far in 2023

Read More »

Unveiling Sitejet Builder: The Perfect Match for Your Effortless Website Creation Needs

Read More »

Dynamic List vs. Active List: A Comprehensive Comparison – Unveiling the Ultimate Winner!

Read More »
Knowledge Base

A website is not responding when a database backup/copy operation is running in Plesk: Error establishing a database connection

Read More »

AWStats page does not display images on Plesk server: AH01630: client denied by server configuration

Read More »

Emails can not be delivered over IPv6 addresses on Plesk with Digital Ocean

Read More »

Websites on Plesk server are slow or show error 500 or PHP mail cannot be sent: ap_pass_brigade failed

Read More »

Hosting Wiki

  • Server Redundancy
  • Bare Metal Server
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • JavaScript
  • Domain
  • Plesk
  • Web Server
  • DNS Server
  • IPv6
  • IPv4
  • SIP
  • SSH
  • UDP/IP
  • TCP/IP
  • HTTP
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family