免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 924 | 回复: 0
打印 上一主题 下一主题

awstats日志分析小结 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-06-03 14:14 |只看该作者 |倒序浏览
awststs是一个非常好用的日志统计工具,下面我对其他主要Web Server/proxy(nginx,squid,lighttpd,httpd)的日志如何进行分析展开说明。
在awstats配置修改最小的前提说明如何如何进行修改,希望对有需要的朋友能够提供帮助。
awstats日志分析之apache
apache:
修改%apache%/conf/httpd.conf
修改为:
CustomLog logs/access_log combined
awstats:
awstats.xxx.conf
        LogFile="%apache%/logs/access_log"即可
  LogType=W
  LogFormat=1       
       
awstats日志分析之tomcat
修改%tomcat%/conf/server.xml
                               
        -->
修改为:        
        
awstats.xxx.conf
        LogFile="%tomcat%/logs/access_log.%yyyy%mm%dd.log"即可
  LogType=W
  LogFormat=1               
       
awstats日志分析之nginx
修改:%nginx%/conf/nginx.conf
    #log_format  main  '$remote_addr - $remote_user [$time_local] $request '
    #                  '"$status" $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;
修改为:
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" $http_x_forwarded_for';

    access_log  logs/access.log  main;
awstats.xxx.conf
        LogFile="%nginx%/logs/access.log."即可
  LogType=W
  LogFormat=1       
  
           
awstats日志分析之squid
修改:%squid%/etc/squid.conf
access_log /usr/local/opt/squid//var/logs/access.log squid
修改为:
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %h" "%{User-Agent}>h" %Ss:%Sh
access_log /usr/local/opt/squid/var/logs/access.log combined
  LogFile="%squid%/var/log/access.log."即可
  LogType=W
  LogFormat=1         
  
awstats日志分析之lighttpd
awstats直接支持lighttpd默认的日志输出格式。
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/93182/showart_1953374.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP