apache httpd 不记录head 的请求。
比如说用了阿里云的slb ,然后他会检测服务器是否正常运行,通常会发大量的HEAD 请求过来。
这样有规则的请求是可以屏蔽的。步骤如下:
- 在 <Directory />中添加 SetEnvIf Request_Method HEAD dontlog
- CustomLog 中修改成 CustomLog logs/access_log combined env=!dontlog
- reload 即可。
可参考http://www.howtoforge.com/setenvif_apache2
官网http://httpd.apache.org/docs/2.2/mod/mod_setenvif.html
不只是Request_Method 还有其他变量也可以进行判断
- Host
- User-Agent
- Referer
- Accept-Language
- Remote_Host: the hostname (if available) of the client making the request.
- Remote_Addr: the IP address of the client making the request.
- Server_Addr: the IP address of the server on which the request was received (only with versions later than 2.0.43).
- Request_Method: the name of the method being used (GET, POST, etc.).
- Request_Protocol: the name and version of the protocol with which the request was made (e.g., "HTTP/0.9", "HTTP/1.1", etc.).
- Request_URI: the resource requested on the HTTP request line - generally the portion of the URL following the scheme and host portion without the query string.
nginx 里面就简单一些
if ( $request_method = "HEAD" )
{
access_log off ;
}
apache httpd 不记录head 的请求。的更多相关文章
- Apache日志不记录图片文件设置方法和来源日志的配置
Apache日志不记录图片文件设置方法 <FilesMatch "\.(ico|gif|jpg|swf)">SetEnv IMAG 1</FilesMatch&g ...
- apache httpd.conf
Apache的主配置文件:/etc/httpd/conf/httpd.conf 默认站点主目录:/var/www/html/ Apache服务器的配置信息全部存储在主配置文件/etc/httpd/co ...
- Apache httpd.conf配置文件 2(Main server configuration)
### Section 2: 'Main' server configuration # # The directives in this section set up the values used ...
- 由浅入深学习Apache httpd原理与配置
一.apache简介: Apache HTTPD又可以简称为httpd或者Apache,它是Internet使用最广泛的web服务器之一,使用Apache提供的web服务器是由守护进程httpd,通过 ...
- Nginx为什么比Apache Httpd高效:原理篇
一.进程.线程? 进程是具有一定独立功能的,在计算机中已经运行的程序的实体.在早期系统中(如linux 2.4以前),进程是基本运作单位,在支持线程的系统中(如windows,linux2.6)中,线 ...
- Fedora8上Apache Httpd与Tomcat6初集成
系统信息: 环境: Linux version :2.6.23.1-42.fc8,gcc version 4.1.2 20070925 Apache Httpd version: 2.2.6.3-3 ...
- Apache httpd和JBoss构建高可用集群环境
1. 前言 集群是指把不同的服务器集中在一起,组成一个服务器集合,这个集合给客户端提供一个虚拟的平台,使客户端在不知道服务器集合结构的情况下对这一服务器集合进行部署应用.获取服务等操作.集群是企业应用 ...
- 缓存(之一) 使用Apache Httpd实现http缓存
http://www.tuicool.com/articles/EFfeu2 HTTP性能的问题与方案 一个最终用户访问一个网页,从浏览器发出请求,到接受请求,时间大体上消耗在了以下几个部分: 建立t ...
- 使用mod_cluster进行apache httpd server和jboss eap 6.1集群配置
本文简单介绍,使用mod_cluster进行apache httpd server和jboss eap 6.1集群配置.本配置在windows上测试通过,linux下应该是一样的.可能要稍作调整.后面 ...
随机推荐
- ES6中的let关键字,有什么用呢?
来吧,开始本节的学习! ES6 给开发者带来很多令人激动的特性,其中let关键字就是其中之一. 那么,let关键字是什么东西? let 的用途 我们回想一下,我们平时在写代码的时候,用var来声明一个 ...
- phpstudy xdebug 配置
来源:https://baijiahao.baidu.com/s?id=1607680791440431678&wfr=spider&for=pc https://www.cnblog ...
- ThinkPHP框架初步掌握
为了帮老师用ThinkSNS二次开发一个微博系统,专门花了几天学习ThinkPHP框架,现在将一些ThinkPHP入门知识作以记录. 首先声明: 本文不是完全教程,只是将开发中碰到的问题作以总结,如果 ...
- PHP open_basedir配置未包含upload_tmp_dir 导致服务器不能上传文件
在做一个上传图片的功能时候发现后台接收到的$_FILES['file']['error'] = 6,这个错误意思是找不到临时文件,或者是临时文件夹无权限,需要更改php.ini文件的 upload_t ...
- webpack3 babel相关
babel 链接地址 在index.js中写入js6的语法如 let fn = (){ console.log('this is es6') } 执行npm run build 在打包出来的js文件中 ...
- ansible的模块使用
转载于 https://www.cnblogs.com/franknihao/p/8631302.html [Ansible 模块] 就如python库一样,ansible的模块也分成了基本模块和 ...
- 【Django】runserver 0.0.0.0:0 后,究竟发生了什么
WSGI协议 Django是遵循WSGI协议设计的 WSGI协议主要包括server和application两个部分: WSGI server:负责从客户端接收请求,将request转发给applic ...
- java并发中的Synchronized关键词
文章目录 为什么要同步 Synchronized关键词 Synchronized Instance Methods Synchronized Static Methods Synchronized B ...
- LVS+Keepalived 实现高可用负载均衡集群
LVS+Keepalived 实现高可用负载均衡集群 随着网站业务量的增长,网站的服务器压力越来越大?需要负载均衡方案!商业的硬件如 F5 ,Array又太贵,你们又是创业型互联公司如何有效 ...
- jdbc批量插入数据
//插入很多书(批量插入用法) public void insertBooks(List<Book> book) { final List<Book> tempBook=b ...