Linux日志分析系统AWStats分析Nignx日志(4)

2.编辑日志配置文件,修改LogFile参数路径为你nginx日志文件的路径
[root@Monitor tools]# vim /etc/awstats/awstats.
# AWSTATS CONFIGURE FILE 7.3
#-----------------------------------------------------------------------------
# Copy this file into awstats. and edit this new config file
# to setup AWStats (See documentation in docs/ directory).
# "LogFile" contains the web, ftp or mail server log file to analyze.
# Possible values: A full path, or a relative path from awstats.pl directory.
# Example: "/var/log/apache/access.log"
# Example: "../logs/mycombinedlog.log"
# You can also use tags in this filename if you need a dynamic file name               
# depending on date or time (Replacement is made by AWStats at the beginning           
# of its execution). This is available tags :                                         
#  %YYYY-n  is replaced with 4 digits year we were n hours ago                       
#  %YY-n    is replaced with 2 digits year we were n hours ago                                                                                                 
LogFile="/data/nginx/0914.log-20170917"      #日志文件存放路径
DirData="/var/lib/awstats"  #创建生成的数据路径
Lang="cn"  #默认语言中文
SkipHosts="127.0.0.1 REGEX[^192\.168\.]" #本地及内部的访问不做分析统计
LevelForWormsDetection=2  #日志等级,不对警告日志进行统计

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/c43c5ef3efd4e05fe210f7cc1629f6d2.html