apache 访问不指定文件类型日志

vim /usr/local/apache2/conf/extra/httpd-hosts.conf

ErrorLog "|/usr/local/apache/bin/rotatelogs -l /usr/local/apache/logs/oem.discuz.qq.com-error_%Y%m%d.log 86400"
    SetEnvIf Request_URI ".*\.gif$" image-request
    SetEnvIf Request_URI ".*\.jpg$" image-request
    SetEnvIf Request_URI ".*\.png$" image-request
    SetEnvIf Request_URI ".*\.bmp$" image-request
    SetEnvIf Request_URI ".*\.swf$" image-request
    SetEnvIf Request_URI ".*\.js$" image-request
    SetEnvIf Request_URI ".*\.css$" image-request
    CustomLog "|/usr/local/apache/bin/rotatelogs -l /usr/local/apache/logs/oem.discuz.qq.com-access_%Y%m%d.log 86400" combined env=!image-request


/usr/local/apache2/bin/apachectl -t

/usr/local/apache2/bin/apachectl start/restart/graceful/stop


本文出自 “Linux学习空间” 博客,转载请与作者联系!

你可能感兴趣的:(REQUEST_URI,SetEnvIf)