我让我的 Apache 以组合模式配置了 logfomat:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
此示例来自结果日志:
192.168.201.156 - - [02/Feb/2013:00:00:10 -0430] "GET /conseme/styles/datePicker.css HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:11 -0430] "GET /conseme/styles/calendario.css HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:11 -0430] "GET /conseme/styles/windows_modal.css HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:11 -0430] "GET /conseme/styles/confirm.css HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:11 -0430] "GET /conseme/js/jquery/jquery.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:11 -0430] "GET /conseme/js/jquery/jquery.min.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:12 -0430] "GET /conseme/js/calendario/date.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:12 -0430] "GET /conseme/js/calendario/jquery.datepicker.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:12 -0430] "GET /conseme/js/jquery.maskedinput.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.201.156 - - [02/Feb/2013:00:00:13 -0430] "GET /conseme/js/Validador.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.202.244 - - [02/Feb/2013:00:00:13 -0430] "GET /portalasegurado/3/BOTPAGO/50/50.10/opcion.do HTTP/1.1" 200 1837 "http://myserver.com.com:49004/portalasegurado/menu.do" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB6; BTRS129265; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; AskTbBCPA/5.14.1.20007; 89770703; compat/4.1.08010)"
192.168.202.244 - - [02/Feb/2013:00:00:13 -0430] "GET /portalasegurado/styles/style.css HTTP/1.1" 200 1228 "http://myserver.com.com:49004/portalasegurado/3/BOTPAGO/50/50.10/opcion.do" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB6; BTRS129265; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; AskTbBCPA/5.14.1.20007; 89770703; compat/4.1.08010)"
192.168.201.156 - - [02/Feb/2013:00:00:13 -0430] "GET /conseme/js/validation.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.202.244 - - [02/Feb/2013:00:00:13 -0430] "GET /portalasegurado/js/jquery/jquery.min.js HTTP/1.1" 200 26048 "http://myserver.com.com:49004/portalasegurado/3/BOTPAGO/50/50.10/opcion.do" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB6; BTRS129265; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; AskTbBCPA/5.14.1.20007; 89770703; compat/4.1.08010)"
192.168.201.156 - - [02/Feb/2013:00:00:13 -0430] "GET /conseme/js/interfaz.js HTTP/1.1" 304 0 "http://myserver.com.com:49004/conseme/iniciar.do?APP_CODE=ICA&pms=9eew1896ugjew8SxfYG2s8XxdYML4qZAVEX4lbkZUGo&aux=SM010213235332219&incrustado=1&usession=6172996210449710866&mainappcode=PORTPROV" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
awstats 的日志格式与配置文件示例相同:
LogFormat = "%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"
这与 apache 输出完美匹配,并且ACCURACY SETUP SECTION (机器人、浏览器、操作系统、引用者、文件类型)检测的每个属性的值为 2。我尝试使用 LevelForBrowsersDetection=allphones 进行测试,但对移动浏览器检测不起作用
我运行 awstats.pl 来构建数据库:
perl C:\mysoft\awstats-7.1\wwwroot\cgi-bin\awstats.pl -config=www.myserver.com -lang=en -staticlinks -update -month=2 -year=2013 ^
LogFile="C:\mysoft\awstats-7.1\tools\logresolvemerge.pl -showsteps C:\temp\awstats\log\2013\02\* |"
接下来运行 builstatic_pages 以生成 html 完整报告
perl C:\mysoft\awstats-7.1\tools\awstats_buildstaticpages.pl -awstatsprog=C:\mysoft\awstats-7.1\wwwroot\cgi-bin\awstats.pl ^
-config=www.myserver.com -lang=en -staticlinks -output -month=2 -year=2013 -dir=.\stats\2013\02 1>awstats_buildstaticpages_last_execution.log
所有这些运行正常,但在主 HTML 页面中的部分:
- 操作系统:只显示未知
- 浏览器:没有检测到手机/手机和版本,显示未知对 IE、Safari、Chrome、FF 和 Opera 的所有差异。
- 来自 Internet 搜索引擎的链接:为空。查看日志,有来自 Google 和其他人的参考资料。
- 搜索关键词:空
- 搜索关键字:空
我的系统环境是: - Windows 7 64b 并在 Windows Server 2003 32b 上测试 - ActivePerl-5.16.2.1602-MSWin32-x86-296513 - Awstats-7.1
我尝试在互联网上查找相关问题,但未成功。
请让我知道任何想法,这对我的移动浏览器和操作系统系列/类型很重要。
谢谢