ITeye博客

基于nginx access 的log 分析

dxm1986 · 2012-03-22 17:27 · nginx · 编程语言 · Markdown

1  设置 nginx access.log 格式

 

 

log_format  main  '$time_local|$proxy_add_x_forwarded_for|$request_method|$request_uri|$request_body|$http_referer'
                      '|$status|$request_time';

 

2  基于crontabe 的定时器脚本

 

    mv access.log access.log.${date}

kill -USR1 $(cat nginx.pid)

 

It's done.

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。