加強網站統計 awstats 的主機解析外掛 GeoIP
作者: cross 日期: 2008-06-16 23:38
但如果要使用它,只要設定 conf 中的 DNSLookup 為 1 就行了
但是但是,DNSLookup 也是有缺點的
1。如果你的網站流量大,相對的 Log 檔就大,在 awstats 過濾時所花費的時間肯定會很慢,這樣效率可能不太好
2。單單只是 IP 反解析,或許太單調了
接下來介紹的是 GeoIP,它是一個資料庫檔案,這檔案需要事先被下載下來使用
Quote: http://www.maxmind.com/app/ip-locate
What is GeoIP?
GeoIP® is the proprietary technology that drives MaxMind's IP geolocation data and services. GeoIP provides businesses with a non-invasive way to determine geographical and other information about their Internet visitors in real-time. When a person visits your website, GeoIP can determine which country, region, city, postal code, area code the visitor is coming from. Furthermore, GeoIP can provide information such as longitude/latitude, connection speed, ISP, company name, domain name, and whether the IP address is an anonymous proxy or satellite provider.
安裝方式
環境 Fedora 8
yum install GeoIP
清單列表 rpm -ql GeoIP
/etc/GeoIP.conf
/etc/GeoIP.conf.default
/usr/bin/geoiplookup
/usr/bin/geoipupdate
/usr/lib/libGeoIP.so.1
/usr/lib/libGeoIP.so.1.4.4
/usr/lib/libGeoIPUpdate.so.0
/usr/lib/libGeoIPUpdate.so.0.0.0
/usr/share/GeoIP
/usr/share/GeoIP/GeoIP.dat
/usr/share/doc/GeoIP-1.4.4
/usr/share/doc/GeoIP-1.4.4/AUTHORS
/usr/share/doc/GeoIP-1.4.4/COPYING
/usr/share/doc/GeoIP-1.4.4/ChangeLog
/usr/share/doc/GeoIP-1.4.4/INSTALL
/usr/share/doc/GeoIP-1.4.4/LICENSE.txt
/usr/share/doc/GeoIP-1.4.4/README
/usr/share/doc/GeoIP-1.4.4/TODO
/usr/share/doc/GeoIP-1.4.4/fetch-geoipdata-city.pl
/usr/share/doc/GeoIP-1.4.4/fetch-geoipdata.pl
/usr/share/man/man1/geoiplookup.1.gz
/usr/share/man/man1/geoipupdate.1.gz
而 awstats 要的就 是這個檔 /usr/share/GeoIP/GeoIP.dat
編輯 awststs.conf
1。DNSLookup 不需要了,所以設成 0
2。反註解 LoadPlugin,設置正確的路徑
DNSLookup=0
LoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat"
看到的結果長這樣
還有還有 GeoLiteCity.dat,用來解析城市、地區的資料庫檔,到這邊下載 http://www.maxmind.com/download/geoip/database/
LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /usr/share/GeoIP/GeoLiteCity.dat"
這樣 awstats 的 IP 反解析,除了看到的資料較多外,還可降低分析所花費的時間
http://www.ducea.com/2006/06/14/speedup-awstats-by-using-geoip-instead-of-dns-lookups/
http://www.antezeta.com/awstats/geoip.html
http://diary.tw/jerry/119
上一篇
返回
下一篇



標籤:




使用google的網站測試工具測出你的網站那邊需要改進才能更快 (2011-11-14 11:14)
一些網頁觀查與除錯的工具 (2011-08-11 09:58)
網站測試工具 - HttpWatch 評估瀏覽下載所花的時間在那 (2010-03-14 01:52)
網站測試 - websiteplus (Part II) 檢查是否被大陸封鎖 (2008-10-29 15:12)
主機測試 just-ping.com (2008-09-25 12:26)
免費網頁掃毒工具 Dr.Web anti-virus link checker (2008-09-18 14:01)
又有新的網站測試可以玩 IP-address.com (2008-09-02 10:48)
網站再慢,也要知道為什麼! (2008-08-19 13:36)
類似 Google 網站管理員工具 Yahoo!奇摩 站長工具 (2008-08-15 10:04)