AWSTATS 分析NGINX 日志 重调格式
p1 p2 与 awstats 服务器之间采取单项sshkey认证,p1 p2 向awstats同步(rsync)文件nginx 与awstats 变量对照表:
$remote_addr ==%host $remote_user ==%logname[$time_local] ==%time1 $request ==%methodurl %code ==$status$body_bytes_sent ==%bytesd $http_referer ==%refererquot$http_user_agent ==%uaquot $http_x_forwarded_for ==%other nginx 格式修改:添加$request_time 和标志位sa:
log_format requst_time '$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent sa "$http_referer" sa ''"$http_user_agent" $http_x_forwarded_for $request_time'; awstats 格式对应:
LogFormat="%host %logname %time1 %methodurl %code %bytesd sa %refererquot sa %uaquot %other %other" 配置关键:
找到nginx 和awstats变量之间的对应关系。
页:
[1]