awstats日志分析小结(1) nginxAccesslighttpdTomcatApache
程序员文章站
2024-03-14 19:10:47
...
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
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
-->
修改为:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".log" pattern="combined" fileDateFormat="yyyy-MM-dd" resolveHosts="false"/>
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 %<st "%{Referer}>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默认的日志输出格式。
在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
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
-->
修改为:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".log" pattern="combined" fileDateFormat="yyyy-MM-dd" resolveHosts="false"/>
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 %<st "%{Referer}>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默认的日志输出格式。
推荐阅读
-
awstats日志分析小结(1) nginxAccesslighttpdTomcatApache
-
HotSpot的G1收集器(日志分析)
-
ELK日志分析系统(1)-基本环境搭建
-
Java垃圾收集器——Parallel、G1收集器日志分析及性能调优示范
-
主成分分析的课堂小结(1)
-
Centos7 下搭建AWStats日志分析服务
-
星外系统IIS日志分析常用的几个命令小结
-
rotatelogs、cronolog分割日志和awstats日志分析系统
-
企业平台架构--Apache配置与应用(Apache的访问控制(KeepAlive),日志分割(rotatelogs和cronolog)实操,日志分析(AWStats)实操
-
Linux- Apache-日志分割技术(rotatelogs和cronolog 工具)及Awstats日志分析系统(解决生产查看日志错误难题,理论加实验)