Do you want to continue setup from this NON standard directory [yN] ? 你是否安装非标准目录【y / n】? .............. file (required if first install) [y/N] ? 文件(如果需要先安装)【y / n】? ............ your web site ,virtual server or profile name: 你的网站服务器名或文件名 >demo ............ directory path to store config file(s) (enter for default): 目录路径存储配置文件(填写默认值) > /etc/awstats ........... 然后,两个回车配置完成。
awstats_configure.pl工具会自动修改您的apache配置,在apache的配置文件httpd.conf文件中自动修改下面信息
[root@localhost conf]# pwd
/usr/local/apache/conf
[root@localhost conf]# vi httpd.conf
awstats_configure.pl自动在httpd.conf文件最底部添加了以下内容:
# Directives to allow use of AWStats as a CGI # Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/" Alias /awstatscss "/usr/local/awstats/wwwroot/css/" Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/" ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/" # # This is to permit URL access to scripts/files in AWStats directory. # Options None AllowOverride None Order allow,deny Allow from all
awstats_configure.pl还将根据安装过程中您的回答(要分析的网站名称)信息,自动生产 /etc/awstats/awstats.index.conf文件
[root@localhost awstats]# pwd
/etc/awstats
[root@localhost awstats]# ls
awstats.index.conf
[root@localhost awstats]# vi awstats.index.conf 配置下面文件
Create/Update database for config "/etc/awstats/awstats.index.conf" by AWStats version 7.0 (build 1.971) From data in log file "/usr/local/apache/logs/access_log"... Phase 1 : First bypass old records, searching new record... Searching new records from beginning of log file... Jumped lines in file: 0 Parsed lines in file: 3 Found 0 dropped records, Found 0 comments, Found 0 blank records, Found 3 corrupted records, Found 0 old records, Found 0 new qualified records.
Error: Couldn't open file "/var/lib/awstats/awstats092012.192.168.1.38.tmp.5138" for write: Permission
denied
Setup ('/etc/awstats/awstats.192.168.1.38.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
有可能与到下面的错误提示,不管你有没有遇到,反正我是遇到了!:
Not Found The requested URL /awastats/awastats.pl was not found on this server. ----------------------------------------------------------------------------- Apache/2.2.3 (CentOS) Server at 192.168.0.105 Port 80