-----> Need to create a new config file ?
#输入y创建一个新的配置文件
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ? y
-----> Define config file name to create
What is the name of your web site or profile analysis ?
Example:
Example: demo
Your web site, virtual server or profile name:
#输入配置文件的名字
> AnalyzeApacheLog
-----> Define config file path
In which directory do you plan to store your config file(s) ?
Default: /etc/awstats
Directory path to store config file(s) (Enter for default):
#指定配置文件目录,一般都是默认的,直接回车就行
>
-----> Create config file '/etc/awstats/awstats.AnalyzeApacheLog.conf'
Config file /etc/awstats/awstats.AnalyzeApacheLog.conf created.
-----> Add update process inside a scheduler
Sorry, configure.pl does not support automatic add to cron yet.
You can do it manually by adding the following command to your cron:
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=AnalyzeApacheLog
Or if you have several config files and prefer having only one command:
/usr/local/awstats/tools/awstats_updateall.pl now
Press ENTER to continue...
A SIMPLE config file has been created: /etc/awstats/awstats.AnalyzeApacheLog.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for 'AnalyzeApacheLog' with command:
> perl awstats.pl -update -config=AnalyzeApacheLog
You can also read your statistics for 'AnalyzeApacheLog' with URL:
#查看分析报告的链接如下:
> ?config=AnalyzeApacheLog
Press ENTER to finish...
修改配置文件:
vi /etc/awstats/awstats.AnalyzeApacheLog.conf
#LogFile="/var/log/httpd/mylog.log"
LogFile="/home/wwwlog/www.pcstars.com_access.log"
注:
(1)如果同时分析多个日志
LogFile="/opt/awstats/tools/logresolvemerge.pl /var/apachelogs/30.0206.vblog.log /var/apachelogs/31.0206.vblog.log|"
或
LogFile="/opt/awstats/tools/logresolvemerge.pl /var/apachelogs/*.0206.vblog.log|"
(2)分析使用gzip压缩过的日志文件
LogFile="gzip -d </var/log/apache/access.log.gz|"
最后重启apache,通过web访问 ?config=AnalyzeApacheLo
前提条件是apache对应的端口没有防火墙限制或者SELinux的限制,否则可能会报403错误
如果出现这种情况最好找系统管理员解决,不要擅自修改系统文件