- 论坛徽章:
- 0
|
关于awstats更新的问题请教
安装了awstats来分析日志 用命令
/usr/local/awstats/wwwroot/cgi-bin/perl awstats.pl -config=www.abc.com -update -lang=cn
分析日志没有问题
此时日志格式如下
LogFile="/usr/local/apache/logs/access_log"
设置
AllowToUpdateStatsFromBrowser=1
在页面可以点更新 且正常分析日志
但是当日志格式设置为
LogFile="gzip -d </usr/local/apache/logs/access_log.gz |"
时 用命令分析日志没有问题 但是启用从浏览器中实时更新统计即AllowToUpdateStatsFromBrowser=1时
点击更新出现Error: Command for pipe 'gzip -d </usr/local/apache/logs/access_log.gz |' failed
Setup ('/etc/awstats/awstats.www.abc.com.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
虽然说做到crontab中可以更新。但总感觉不爽,也搜了些资料说是权限问题 但还是无法解决 特
请教!看下面帮助说是权限问题
可我的如下,还是有问题
/usr/local/awstats/data
drwxr-xr-x 2 daemon daemon 4096 01-15 05:21 data
data内文件也都属主daemon 权限为755了
# When AWStats updates its statistics, it stores results of its analysis in
# files (AWStats database). All those files are written in the directory
# defined by the "DirData" parameter. Set this value to the directory where
# you want AWStats to save its database and working files into.
# Warning: If you want to be able to use the "AllowToUpdateStatsFromBrowser"
# feature (see later), you need "Write" permissions by web server user on this
# directory (and "Modify" for Windows NTFS file systems).
# Example: "/var/lib/awstats"
# Example: "../data"
# Example: "C:/awstats_data_dir"
# Default: "." (means same directory as awstats.pl)
#
DirData="/usr/local/awstats/data"
# When this parameter is set to 1, AWStats add a button on report page to
# allow to "update" statistics from a web browser. Warning, when "update" is
# made from a browser, AWStats is ran as a CGI by the web server user defined
# in your web server (user "nobody" by default with Apache, "IUSR_XXX" with
# IIS), so the "DirData" directory and all already existing history files
# awstatsMMYYYY[.xxx].txt must be writable by this user. Change permissions if
# necessary to "Read/Write" (and "Modify" for Windows NTFS file systems).
# Warning: Update process can be long so you might experience "time out"
# browser errors if you don't launch AWStats enough frequently.
# When set to 0, update is only made when AWStats is ran from the command
# line interface (or a task scheduler).
# Possible values: 0 or 1
# Default: 0
#
AllowToUpdateStatsFromBrowser=1 |
|