Archive for the tag 'awstats'

Configuring AwStats to show the country of site visitors.

By default AwStats does not show the source country for visitors viewing a domain. To enable this feature, the 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 comes with AwStats package, but the Perl modules necessary for the plugin to work (Geo::IP or Geo::IP::PurePerl) should be installed. You can get all the necessary installation instructions and downloadable plugin files (for example, “Geo::IP::PurePerl Module” library) from here:

http://awstats.sourceforge.net/docs/awstats_contrib.html#geoip

http://www.maxmind.com/app/perl?rId=awstats

The plugin needs to be enabled in the main AwStats configuration files:

/etc/awstats/awstats.conf
/etc/awstats/awstats.model.conf

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/

How do I change default language for AWStats?

Languages for AWStats are defined by “Lang” directives in it’s configuration files. New languages need to be set in the main AWStats configuration files.

/etc/awstats/awstats.conf
/etc/awstats/awstats.model.conf

The files which are already configured by Plesk for every domain can be found in the following files (Be sure to replace mt-example.com with your domain name):

/usr/local/psa/etc/awstats/awstats.serverbuddies.com-http.conf
/usr/local/psa/etc/awstats/awstats.serverbuddies.com-https.conf

By default Lang is set to Lang=”auto”, this means it will accept the first available language by the browser. You can change it to any supported value that can be found above the Lang directive in the configuration files.

For example, if you want English you would use the following:

Lang=”en”

When you are finished making any changes be sure to restart awstats to see any changes instantly.

Reference: http://parallels.com

SBDavid

Update awstats in Plesk Manually

Update awstats in Plesk Manually

To update stats manually for a domain, you can run the following command. Replace the “domain.com” with the domain name.

$ /usr/local/psa/admin/sbin/statistics –calculate-one –domain-name=domain.com

To generate stats for all the domains in the server, use the following command.

$ /usr/local/psa/admin/sbin/statistics

If you receive any error, please make sure that the binaries are present in the path specified in the configuration file ‘/etc/psa/psa.conf’

$ grep AWSTAT /etc/psa/psa.conf

will return the path

AWSTATS_ETC_D /etc/awstats
AWSTATS_BIN_D /var/www/cgi-bin/awstats
AWSTATS_TOOLS_D /usr/share/awstats
AWSTATS_DOC_D /var/www/html/awstats

Make sure that the following files are present in the correct location.

awstats_buildstaticpages.pl: /usr/share/awstats/awstats_buildstaticpages.pl
awstats.pl: /var/www/cgi-bin/awstats/awstats.pl
SBDavid

Update awstats in Plesk Manually

Update awstats in Plesk Manually

To update stats manually for a domain, you can run the following command. Replace the “domain.com” with the domain name.

$ /usr/local/psa/admin/sbin/statistics –calculate-one –domain-name=domain.com

To generate stats for all the domains in the server, use the following command.

$ /usr/local/psa/admin/sbin/statistics

If you receive any error, please make sure that the binaries are present in the path specified in the configuration file ‘/etc/psa/psa.conf’

$ grep AWSTAT /etc/psa/psa.conf

will return the path

AWSTATS_ETC_D /etc/awstats
AWSTATS_BIN_D /var/www/cgi-bin/awstats
AWSTATS_TOOLS_D /usr/share/awstats
AWSTATS_DOC_D /var/www/html/awstats

Make sure that the following files are present in the correct location.

awstats_buildstaticpages.pl: /usr/share/awstats/awstats_buildstaticpages.pl
awstats.pl: /var/www/cgi-bin/awstats/awstats.pl