Originally posted by Nanu at 2005-2-20 16:54
最后,在/etc/awstats/awstats.yourdomain.conf中开启Geo::IPfree插件。
你说的是启用第二个(Geo::IPfree)
# Plugin: GeoIPfree
# Perl modules required: Geo::IPfree version 0.2+ (from Graciliano M.P.)
# 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::IPfree
# module, database less up to date) or the GeoIP plugin (need Perl Geo::IP
# module from Maxmind, database more up to date).
# Note: Activestate provide a corrupted version of Geo::IPfree 0.2 Perl
# module, so install it from elsewhere (from www.cpan.org for example).
# This plugin reduces AWStats speed of 10% !
#
LoadPlugin="geoipfree"
个人感觉,用第一种(Geo::IP)比较好,而且支持在线的国家数据库升级
# 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% !
#
LoadPlugin="geoip GEOIP_STANDARD"
[root@test tmp]# /opt/www/cgi-bin/awstats.pl -update -config=192.168.1.123:80
Update for config "/etc/awstats/awstats.192.168.1.123:80.conf"
With data in log file "/opt/apache/logs/access_log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
AWStats did not find any valid log lines that match your LogFormat parameter, in
the 50th first non commented lines read of your log.
Your log file /opt/apache/logs/access_log must have a bad format or LogFormat pa
rameter setup does not match this format.
Your AWStats LogFormat parameter is:
1
This means each line in your web server log file need to have "combined log form
at" like this:
111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http:// www.fromserver.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0
)"
And this is an example of records AWStats found in your log file (the record num
ber 50 in your log):
192.168.1.111 - - [26/Jun/2005:20:07:38 +0800] "GET /index.php?=PHPE9568F34-D428
-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2962
Setup ('/etc/awstats/awstats.192.168.1.123:80.conf' file, web server or permissi
ons) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).