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. [Java开发之路](23)装箱与拆箱

    1. 简单介绍 大家对基本数据类型都很熟悉.比如 int.float.double.boolean.char 等.基本数据类型是不具备对象的特性,比方基本类型不能调用方法.功能简单. ..,为了让基本 ...

  2. 六种基本DCDC变换器拓扑结构

    1.SEPIC电路 2.

  3. js将字符串转变成数字

    方法主要有三种 转换函数.强制类型转换.利用js变量弱类型转换. 1. 转换函数: js提供了parseInt()和parseFloat()两个转换函数.前者把值转换成整数,后者把值转换成浮点数.只有 ...

  4. jdbc 链接池的优化

    package cn.itcast.jdbc.datasourse; import java.sql.Connection;import java.sql.DriverManager;import j ...

  5. Kindeditor上传图片回显不出来

    原因之一: 图片成功上传但是回显不出来,这个时候,要检查返回的图片地址是否加了http://这个玩意,不然会将原来的头加上图片返回地址.

  6. 【selenium+Python WebDriver API】之复选框顺序正选和顺序反选

    from selenium import webdriver from selenium.webdriver.common.by import By import os,time driver = w ...

  7. ASP.NET动态网站制作(1)--html

    前言:正式上课的第一课,讲的是前端部分的最基础内容:html. 前端:html,css,js 数据库:sql server 动态部分:.net,c#... IIS(Internet Informati ...

  8. 计算机网络--DNS

    1.域名系统DNS(domain name system)是因特网使用的命名系统,用来把便于人们时用的机器名字转换为IP地址.因特网的域名系统DNS被设计成一个联机分布式数据库系统,并采用客户服务器方 ...

  9. SCRM从入门到精通01

    [SCRM从入门到精通01]如何基于微信开放接口开发企业的微信CRM? 业内一直都在传说微信是天生的CRM,可是没有人看到过微信CRM的真容.随着微信最新公众平台的改版和开放接口的微信认证开放,微信C ...

  10. sed命令使用举例

    选择操作的行范围 sed -n '1,2p' testsed2.txt  匹配第1到2行 sed -n '/a/,/b/p' testsed2.txt  匹配从包含a的行到包含b的行 sed -n ' ...