apache日志配置(不记录图片)

测试环境:

easyphp1.8

 

apache配置文件:
conf/httpd.conf

 

找到行:

CustomLog logs/access.log common

 

替换行:

#
# 图片,flash,css,js等内容将不记录日志

#

<FilesMatch "\.(ico|gif|jpg|swf|png|css|js)">
SetEnv IMAG 1
</FilesMatch>
CustomLog logs/access.log combined env=!IMAG

 

学习更多阅读:
http://hi.baidu.com/baijy/blog/item/ed9e92ec7fad443e26979108.html

你可能感兴趣的:(apache)