一旦 Webalizer 在系统中安装完成,我们必须将以下行添加到httpd.conf文件中,以便能够定位和使用其功能。
编辑httpd.conf文件,vi/etc/httpd/conf/httpd.conf并在 <IfModule mod_alias.c> 和 </IfModule> 区段标签之间添加以下行
Alias /usage/ "/home/httpd/usage/" <Directory "/home/httpd/usage"> Options None AllowOverride None Order deny,allow Deny from all Allow from 192.168.1.0/24 </Directory> |
添加上述行到 Apache 的httpd.conf文件后,不要忘记重启 Apache Web 服务器
[root@deep ] /# /etc/rc.d/init.d/httpd restart |
Shutting down http: [ OK ] Starting httpd: [ OK ] |
现在是运行程序以生成报告的时候了,html和图形,在默认的 Webalizer 目录中,以便我们可以在 Web 浏览器界面中看到它们。此步骤仅在您首次安装和使用 Webalizer 时需要,因为最好在将来使用 cron 任务来自动化此任务。要手动运行 Webalizer 以生成报告,请使用以下命令
[root@deep ] /# /usr/bin/webalizer |
Webalizer V1.30-04 (Linux 2.2.14) English Using logfile /var/log/httpd/access_log Creating output in /home/httpd/usage Hostname for reports is 'deep.openna.com' History file not found... Previous run data not found... Saving current run data... [03/06/2000 04:42:03] Generating report for March 2000 Generating summary report Saving history information... 81 records (2 ignored) in 0.31 seconds |
在此阶段,我们应该验证 Webalizer 是否在系统上正常工作。为此,请将您的 Web 浏览器指向以下地址http://my-web-server/usage/。my-web-server是您的 Apache Web 服务器所在的地址,并且usage是托管所有 Webalizer 报告文件的目录。