apache不记录图片的访问记录的设置 不指定

jed , 2009-7-14 13:33 , 服务器技术 , 评论(0) , 阅读(3155) , Via 本站原创 | |
本示例将避免对图片的请求出现在访问日志中。 你可以随便改改就将它用于避免特定目录或特定主机的请求被记入日志。


SetEnvIf Request_URI \.gif image-request
SetEnvIf Request_URI \.jpg image-request
SetEnvIf Request_URI \.png image-request
CustomLog logs/access_log common env=!image-request

只记录php访问记录的设置

SetEnvIf Request_URI "^/.*\.php$" dontlog
CustomLog logs/access_log common env=dontlog



SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
SetEnvIf Request_URI "^/favicon.ico$" dontlog
SetEnvIf Request_URI "^/images/.*$" dontlog
SetEnvIf Request_URI "^/.*\.js$" dontlog
SetEnvIf Request_URI "^/.*\.css$" dontlog
SetEnvIf Request_URI "^/.*\.dwr$" dontlog


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~VirtualHost~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

NameVirtualHost 192.168.1.103:80


<VirtualHost 192.168.1.103:80>
    ProxyRequests On
    DocumentRoot /opt/project

    ServerName 192.168.1.103
    DirectoryIndex index.jsp
    
    RewriteEngine On
    RewriteRule ^(http|https)://.* - [F]
    
    ProxyPass /pic/ http://192.168.1.101/
    ProxyPass /report/ http://192.168.1.101:8081/report/
    ProxyPass / balancer://proxy/ stickysession=JSESSIONID
    <Proxy balancer://proxy>
          BalancerMember ajp://192.168.1.103:10003/  route=A loadfactor=1
          BalancerMember ajp://192.168.1.103:20003/  route=B loadfactor=1
          BalancerMember ajp://192.168.1.101:10003/  route=C loadfactor=1
          BalancerMember ajp://192.168.1.101:20003/  route=D loadfactor=1
    </Proxy>
    ErrorLog logs/error_log.log
    CustomLog "|/usr/local/httpd/bin/rotatelogs /usr/local/httpd/logs/access_%Y_%m_%d.log 86400 480" combined env=!dontlog
</VirtualHost>



发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]