随笔 - 224  文章 - 41  trackbacks - 0
<2012年2月>
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910

享受编程

常用链接

留言簿(11)

随笔分类(159)

随笔档案(224)

文章分类(2)

文章档案(4)

经典c++博客

搜索

  •  

最新评论

阅读排行榜

评论排行榜

原文地址:http://blog.sina.com.cn/s/blog_551393a90100p4tx.html

LoadModule setenvif_module modules/mod_setenvif.so
SetEnvIf Request_URI "^/enterprise/main\.php.*$" dontlog
CustomLog d:/logs/%Y%m%d.log combined env=!dontlog
参考资料:
正则表达式30分钟入门教程
Apache的环境变量
转载内容:
为了提高系统的访问速度,需要减少Apache日志操作,下面是Apache日志过滤的参考样例:
# filter the localhost visit
SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
# filter some special directories
SetEnvIf Request_URI "^/system/.*$" dontlog
SetEnvIf Request_URI "^/export/.*$" dontlog
SetEnvIf Request_URI "^/resources/.*$" dontlog
# filter the intranet visit
SetEnvIf Remote_Addr "211\.167\.51\.199" dontlog
# filter the google bot
SetEnvIf Remote_Addr "66\.249\.6[4-9]\.[0-9]+" dontlog
SetEnvIf Remote_Addr "66\.249\.[7-8][0-9]\.[0-9]+" dontlog
SetEnvIf Remote_Addr "66\.249\.9[0-5]\.[0-9]+" dontlog
# filter the microsoft bot: 65.52.0.0 - 65.55.255.255
SetEnvIf Remote_Addr "65\.5[2-5]\.[0-9]+\.[0-9]+" dontlog
CustomLog logs/access_log common env=!dontlog
posted on 2012-02-14 15:50 漂漂 阅读(980) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理