Apache日志格式及获取客户端IP

来源:互联网 发布:java的execute 编辑:程序博客网 时间:2024/05/19 17:48
LogLevel warn
LogFormat "%{clientip}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog "|/usr/sbin/rotatelogs /var/log/httpd/access_log-%Y-%m-%d-%H 7200 480" combined
0 0
原创粉丝点击