로그 분석기인 AWStats 에 GeoIP 를 사용하여 국가별로 어디서 접속했는지 통계를 낼수가 있습니다.
(기본으로 AWStats 를 설치하게 되면 GeoIP 플러그인은 비활성화 되어 있기 때문에 수동으로 바꿔줘야 합니다.)

GeoIP 바이너리 파일을 다운로드 하고 적당한 곳에 압축을 풀어줍니다.

[root@yongbok ~]# mkdir -p /usr/local/share/GeoIP
[root@yongbok ~]# cd /usr/local/share/GeoIP
[root@yongbok ~]# wget \
http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
[root@yongbok ~]# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

[root@yongbok ~]# gzip -d GeoIP.dat.gz
[root@yongbok ~]# gzip -d GeoLiteCity.dat.gz

[root@yongbok ~]# ls -l /usr/local/share/GeoIP
total 29056
-r–r–r–  1 root  wheel   1156240  1 12 18:25 GeoIP.dat
-r–r–r–  1 root  wheel  28543655  1  4 16:06 GeoLiteCity.dat

GeoIP 플러그인을 사용하기 위해 AWStats 설정 파일에 1312라인과 1352라인에 적절하게 수정합니다.

[root@yongbok ~]# vi /etc/awstats/awstats.ruo91.conf
# Plugin: GeoIP
LoadPlugin=”geoip GEOIP_STANDARD /usr/local/share/GeoIP/GeoIP.dat”

# Plugin: GeoIP_City_Maxmind
LoadPlugin=”geoip_city_maxmind GEOIP_STANDARD /usr/local/share/GeoIP/GeoLiteCity.dat”

AWStats 업데이트 합니다.

[root@yongbok ~]# /usr/local/awstats/tools/awstats_updateall.pl now
Running ‘”/usr/local/awstats/wwwroot/cgi-bin/awstats.pl” -update -config=ruo91 -configdir=”/etc/awstats”‘ to update config ruo91
Create/Update database for config “/etc/awstats/awstats.ruo91.conf” by AWStats version 6.95 (build 1.943)
From data in log file “/home/apache2-log/www/www-access-2010-01-12.log”…
Phase 1 : First bypass old records, searching new record…
Direct access after last parsed record (after line 823)
Jumped lines in file: 823
Found 823 already parsed records.
Parsed lines in file: 10
Found 0 dropped records,
Found 0 corrupted records,
Found 0 old records,
Found 10 new qualified records.

웹에서 확인 해보면 됩니다.

http://www.yourdomain.com/awstats/awstats.pl?config=config_file_name