自己编译的Nginx或者改变了Nginx的日志文件名格式的话 logwatch就不知道怎么去分析
需要告诉Logwatch文件在哪里
我们创建一个配置文件
[bash]vim /usr/share/logwatch/dist.conf/logfiles/http.conf[/bash]
#Analyse Nginx Log Files
#ihipop 2011/5/14LogFile = /usr/local/nginx/logs/*/*access.log
LogFile = /usr/local/nginx/logs/*access.log
Archive = /usr/local/nginx/logs.old/*access.log.*.gz# Expand the repeats (actually just removes them now)
*ExpandRepeats# Keep only the lines in the proper date range...
*ApplyhttpDate
From:http://mathew-davies.co.uk/2010/06/22/nginx-logwatch-configuration.html