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的更多相关文章

  1. 解决Apache日志"internal dummy connection"方法

    最近查看服务器中apache日志,发现有大量的 OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy co ...

  2. 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 ...

  3. 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 ...

  4. 日常报错记录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 ...

  5. STM32F4 Timer Internal Trigger Connection

    The Timers can be cascaded to make more complex timing relationships, or longer periods. Internally ...

  6. modsecurity配置指令学习

    事务(transactions) Console(控制台) 1 Introduction Modsecurity是保护网络应用安全的工作.不,从零开始.我常称modsecurity为WAF(网络应用防 ...

  7. ELK的高级篇(测试记录各种日志)

    一.elk架构已经完成情况情况下  访问限制: 加个x-pack插件  1)一个脚本收集多个日志,if 判断写入es的索引 [root@k8s6 conf.d]# cat file.conf inpu ...

  8. GoAccess操作手册

    名字 GoAccess - 可视化 Web 日志分析工具. 语法 goaccess [filename] [ options ... ] [-c][-M][-H][-q][-d][...] 描述 Go ...

  9. 正则表达式——maltrail工程项目中使用

    1. 正则表达所需语法 \ 正则表达式使用反斜杠字符 ('') 来表示特殊形式或是允许在使用特殊字符时不引发它们的特殊含义. 转义特殊字符(允许你匹配 '*', '?', 或者此类其他) \A 只匹配 ...

随机推荐

  1. 面向对象程序的设计原则--Head First 设计模式笔记

    一.找出应用中可能需要变化的地方,把它们独立出来,不要和那些不需要变化的代码混在一起. 把会变化的部分取出并“封装”起来,好让其他部分不会受到影响.这样,代码变化引起的不经意后果变少,系统变得更有弹性 ...

  2. 修改Oracle SGA,以提高oracle性能

    在正常情况下,查询非常慢. 1.检查SGA大小,以DBA身份连接到oracle数据库,输入show sga. 2.如果SGA过小,请修改其大小 修改SGA必须保持的原则 1).sga_target不能 ...

  3. vim diff 的使用

    vimdiff 是vim的比较工具可以对两个文件进行差异比较和快速合并 1. 使用vimdiff 比较两个文件 方式一 vimdiff  file_left  file_right   或者  vim ...

  4. SpringMvc自动代理

    自动配置的好处是不需要挨个 实现[org.springframework.aop.framework.ProxyFactoryBean] ,只需要 advisor 配置和 <bean id=&q ...

  5. os引导程序boot从扇区拷贝os加载程序loader文件到内存(boot copy kernel to mem in the same method)

    [0]README 0.1) 本代码旨在演示 在boot 代码中,如何 通过 loader文件所在根目录条目 找出该文件的 在 软盘所有全局扇区号(簇号),并执行内存中的 loader 代码: 0.2 ...

  6. 爬虫学习一系列:urllib2抓取网页内容

    爬虫学习一系列:urllib2抓取网页内容 所谓网页抓取,就是把URL地址中指定的网络资源从网络中读取出来,保存到本地.我们平时在浏览器中通过网址浏览网页,只不过我们看到的是解析过的页面效果,而通过程 ...

  7. 2_Jsp标签_传统标签功能简介

    1传统标签接口关系:                                   2功能简介                                                   ...

  8. Flyweight Design Pattern 共享元设计模式

    就是利用一个类来完毕多种任务.不用每次都创建一个新类. 个人认为这个设计模式在C++里面,好像能够就使用一个函数取代,利用重复调用这个函数完毕任务和重复利用这个类,好像几乎相同. 只是既然是一个设计模 ...

  9. 具体解释TCP协议的服务特点以及连接建立与终止的过程(俗称三次握手四次挥手)

    转载请附本文的链接地址:http://blog.csdn.net/sahadev_/article/details/50780825 ,谢谢. tcp/ip技术经常会在我们面试的时候出现,非常多公司也 ...

  10. Android之——卸载应用程序

    转载请注明出处:http://blog.csdn.net/l1028386804/article/details/47357729 不多说,不废话,直接上代码,大家都懂得 //卸载应用程序 //參数为 ...