vi /etc/squid/squid.conf
emulate_httpd_log on
------------------------------------------
vi /etc/awstats/awstats.squid.conf
------------------------------------------
LogFile="/var/log/squid/access.log"
LogType=W
LogFormat=4
SiteDomain="domain.com"
HostAliases="92.168.0.4 localhost 127.0.0.1"
LevelForBrowsersDetection=0
LevelForOSDetection=0
LevelForRefererAnalyze=0
LevelForRobotsDetection=0
LevelForSearchEnginesDetection=0
LevelForKeywordsDetection=0
LevelForFileTypesDetection=2
LevelForWormsDetection=2
ShowDomainsStats=0
ShowRobotsStats=0
ShowWormsStats=HBL
ShowFileSizesStats=0
ShowOSStats=0
ShowBrowsersStats=0
ShowOriginStats=0
ShowKeyphrasesStats=0
ShowKeywordsStats=0
ShowMiscStats=0
------------------------------------------
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=squid -update
測試:http://IP/awstats/awstats.pl?config=squid
------------------------------------------
#定時更新
vi /etc/crontab
50 4 * * * root /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=squid -update >/dev/null 2>&1
2.若有多個設定檔要執行的話可以執行
/usr/local/awstats/tools/awstats_updateall.pl now
vi /etc/crontab
0 23 * * * root /usr/local/awstats/tools/awstats_updateall.pl now >/dev/null 2>&1
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言