awstats 日志格式

zc_nicolsa 发布于 2013/04/17 16:37
阅读 693
收藏 0
各位大神:
nginx的日志格式
  log_format proxy  '$proxy_add_x_forwarded_for [$time_local]'
                   ' "$request"  $status $body_bytes_sent '
                   ' "$http_referer" "$http_user_agent" ';


awstats下我设置的参数是:
 LogFormat = "%host %time1 %methodurl %code %bytesd %refererquot %uaquot"


运行结果是报格式错误
Create/Update database for config "/etc/awstats/awstats.www.xxxx.com.conf" by AWStats version 7.0 (build 1.971)
From data in log file "/data/logs/test-log/broker-access_20130416.log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log.
Your log file /data/logs/test-log/broker-access_20130416.log must have a bad format or LogFormat parameter setup does not match this format.
Your AWStats LogFormat parameter is:
%host %time1 %methodurl %code %bytesd %refererquot %uaquot
This means each line in your web server log file need to have the following personalized log format:
%host %time1 %methodurl %code %bytesd %refererquot %uaquot
And this is an example of records AWStats found in your log file (the record number 50 in your log):
61.150.91.223 [17/Apr/2013:00:18:32 +0800] "GET / HTTP/1.1"  200 14301  "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; JianKongBao Monitor 1.1)"
Setup ('/etc/awstats/awstats.www.fybanks.com.conf' file, web server or permissions) may be wrong.

Check config file, permissions and AWStats documentation (in 'docs' directory).


求指教~~

加载中
0
T
Thomas-yang
太软了吧 压根看不清楚
返回顶部
顶部