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 只匹配 ...
随机推荐
- linq查询去重
通过自定义扩展方法DistinctBy实现去重 public static IEnumerable<TSource> DistinctBy<TSource, TKey> (th ...
- 结构体定义:struct与typedef struct
https://blog.csdn.net/haiou0/article/details/6877718?tdsourcetag=s_pcqq_aiomsg https://blog.csdn.net ...
- An easy to use android color picker library
https://github.com/xdtianyu/ColorPicker
- 献给写作者的 Markdown 新手指南及语法
烈推荐所有写作者学习和掌握该语言.为什么?可以参考: 『为什么作家应该用 Markdown 保存自己的文稿』. 『Markdown写作浅谈』 让你专注于文字而不是排版. 标题 只需要在文本前面加上 # ...
- 目标检测之vibe---ViBe(Visual Background extractor)背景建模或前景检测
ViBe算法:ViBe - a powerful technique for background detection and subtraction in video sequences 算法官网: ...
- Python学习总结之五 -- 入门函数式编程
函数式编程 最近对Python的学习有些怠慢,最近的学习态度和学习效率确实很不好,目前这种病况正在好转. 今天,我把之前学过的Python中函数式编程简单总结一下,分享给大家,也欢迎并感谢大家提出意见 ...
- Objective-C/C++混编编译器设置
本文转载至 http://blog.csdn.net/yu0089/article/details/8220275 当使用Xcode编写C++代码时,难以避免要使用xcode/C++混合编译. 如果你 ...
- rabbitmq 安装-单点
centos6.5 rabbitmq搭建 环境:centos6.5 192.168.9.41 安装rabbitmq需要先安装erlang.rabbitmq3.6版本需要erlang R16B03 ...
- GS与网络打交道
与网络打交道 在GS,GC,Share都与网络打交道,但还是GC最多 GC打交道过程 send_stat BaseChannel::SendCmdTry() { if (!m_queCmd.size( ...
- 九度OJ 1173:查找 (排序、查找)
时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:5808 解决:3163 题目描述: 输入数组长度 n 输入数组 a[1...n] 输入查找个数m 输入查找数字b[1...m ...