Stop logging "internal dummy connection" in Apache
Apache 2.x keeps child processes alive by creating internal connections which appear in the log files as "internal dummy connection" on the IP address ::1 or 127.0.0.1. If you ever monitor Apache log files you'll see a lot of these in the log files. This post shows how to prevent logging for these two IP addresses so your log files won't get filled up with these
What the log lines look like
With IPv6 the log lines come from the IP address ::1 and will look similar to this:
1 |
::1 - - [11/Oct/2010:13:02:47 +1300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny9 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g (internal dummy connection)" |
Prevent logging for local requests
The simplest solution is to prevent logging for local requests. Normally these would only be from the Apache server itself, unless you are doing something special which is requesting pages using the local IP address (i.e. ::1 or 127.0.0.1).
Locate the logging section of your main Apache log file. You'll have an entry something along the lines of this, although the exact setting will vary depending on which operating system, distribution and version you are using, or any custom changes you have made:
1 |
CustomLog /var/log/apache2/access.log combined |
Add this line for IPv4 style IP addresses for local connections (127.0.0.1):
1 |
SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog |
or this for IPv6 style IP addresses (::1):
1 |
SetEnvIf Remote_Addr "::1" dontlog |
And then add env=!dontlog to the end of your logging line so it looks like this, using the same example as shown above:
1 |
CustomLog /var/log/apache2/access.log combined env=!dontlog |
Now restart Apache and any local connections, including those "internal dummy connection" entries, will no longer be logged.
Stop logging "internal dummy connection" in Apache的更多相关文章
- 解决Apache日志"internal dummy connection"方法
最近查看服务器中apache日志,发现有大量的 OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy co ...
- How To Configure Logging And Log Rotation In Apache On An Ubuntu VPS
Introduction The Apache web server can be configured to give the server administrator important info ...
- 11:12:21.924 [main] DEBUG org.apache.ibatis.logging.LogFactory - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.
11:12:21.924 [main] DEBUG org.apache.ibatis.logging.LogFactory - Logging initialized using 'class or ...
- 日常报错记录2: MyBatis:DEBUG [main] - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.------------ Cause: java.lang.NoSuchMethodException: com.offcn.dao.ShopDao.<init>()
直接上干货: 报错归纳1: DEBUG [main] - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4 ...
- STM32F4 Timer Internal Trigger Connection
The Timers can be cascaded to make more complex timing relationships, or longer periods. Internally ...
- modsecurity配置指令学习
事务(transactions) Console(控制台) 1 Introduction Modsecurity是保护网络应用安全的工作.不,从零开始.我常称modsecurity为WAF(网络应用防 ...
- ELK的高级篇(测试记录各种日志)
一.elk架构已经完成情况情况下 访问限制: 加个x-pack插件 1)一个脚本收集多个日志,if 判断写入es的索引 [root@k8s6 conf.d]# cat file.conf inpu ...
- GoAccess操作手册
名字 GoAccess - 可视化 Web 日志分析工具. 语法 goaccess [filename] [ options ... ] [-c][-M][-H][-q][-d][...] 描述 Go ...
- 正则表达式——maltrail工程项目中使用
1. 正则表达所需语法 \ 正则表达式使用反斜杠字符 ('') 来表示特殊形式或是允许在使用特殊字符时不引发它们的特殊含义. 转义特殊字符(允许你匹配 '*', '?', 或者此类其他) \A 只匹配 ...
随机推荐
- ios控件自定义指引
转载自:http://bbs.9ria.com/thread-256747-1-1.html 一直以来都想写点什么,做点有意义的事,从今天开始我将会把自己在这一年的学习和应用IOS开发中的学习心得和体 ...
- sublime添加sass编译
首先安装Ruby环境sass是基于ruby的产物,因此在安装sass前需要先安装ruby,如果用命令方式编译Sass也是必须安装ruby的.命令行编译sass见!下载Ruby windows 安装包: ...
- javascript判断智能终端信息
< script type = "text/javascript" > /* * 智能机浏览器版本信息: * */ var browser = { versions: ...
- Battery Charging Specification 1.2 中文详解
转: http://blog.csdn.net/liglei/article/details/228 1. Introduction 1.1 Scope 规范定义了设备通过USB端口充电的 ...
- Key-Value键值存储原理初识(NOSQL)
NO-Sql数据库:Not Only不仅仅是SQL 定义:非关系型数据库:NoSQL用于超大规模数据的存储.(例如谷歌或Facebook每天为他们的用户收集万亿比特的数据).这些类型的数据存储不需要固 ...
- PHP RSA加解密示例(转)
1.生成密钥和公钥 开始前需要准备openssl环境 linux 需要安装openssl工具包,传送门http://www.openssl.org/source/ window 下需要安装openss ...
- 【C语言天天练(二)】statickeyword
引言: statickeyword不仅能够修饰变量.并且能够修饰函数.了解它的使用方法,不仅对阅读别人的代码有帮助,也有助于自己写出更加健壮的程序. 使用方法: ...
- php迭代器模式
其实就是遍历数组 然后对数组中的元素进行操作 实现iterator接口即可.
- 【WPF学习笔记】之 System.Exception 对象名 'XXXX' 无效。
我在运行vs时候发现项目报错,如下图: 报Exception错误,对象名“XXXXXX”无效. 经过调查得知,因为连接数据库的库名写错了,如下: 对应正确数据库的库名: 把库名改正确,问题就解决了.
- JAVA中两个Set比较找出交集、差集、并集
当做到某些功能的时候,使用Set能够快速方便地将需要的类型以集合类型保存在一个变量中,Set是最简单的一种集合,集合中的对象不按特定的方式排序,并且没有重复对象. //两个Set比较找出交集.差集.并 ...