awstats 日志格式

发布于 2021-11-17 04:50:36 字数 1888 浏览 735 评论 1

各位大神:
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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱你是孤单的心事 2021-11-20 00:27:42

太软了吧 压根看不清楚

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文