awstats 日志格式
各位大神:
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.
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).
求指教~~
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
太软了吧 压根看不清楚