• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Electric Toolbox Blog

The Electric Toolbox Blog

Linux, Apache, Nginx, MySQL, Javascript and PHP articles

  • Applications
  • FCKEditor
  • Apache
  • Windows
  • Contact Us
Home / Stop logging “internal dummy connection” in Apache

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 - - [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:

CustomLog /var/log/apache2/access.log combined

Add this line for IPv4 style IP addresses for local connections (127.0.0.1):

SetEnvIf Remote_Addr "127.0.0.1" dontlog

or this for IPv6 style IP addresses (::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:

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.

Check Out These Related posts:

  1. Changing exim4 settings with Debian 5 Lenny
  2. What Is a VPN?
  3. VPNSecure Review
  4. NordVPN vs IPVanish

Filed Under: Apache

Primary Sidebar

Categories

  • Apache
  • Applications
  • Article
  • Case Studies
  • Email Servers
  • FCKEditor
  • HTML And CSS
  • Javascript
  • Linux/Unix/BSD
  • Microsoft SQL Server
  • Miscellaneous Postings
  • MySql
  • Networking
  • Nginx Web Server
  • Offsite Articles
  • OSX
  • PHP
  • Quick Tips
  • RFC – Request for Comments
  • SilverStripe
  • VMWare
  • VPN
  • Windows
  • WordPress

Recent Posts

  • Vim Show Line Numbers
  • Add User To Group Linux
  • Chmod 777 Tutorial
  • How to Copy Directory Linux
  • Linux create user

Copyright © 2021. ElectricToolBox. All Rights Reserved.

  • Contact Us
  • Copyright Info
  • Privacy Policy
  • Sitemap