Stop Logging "Internal dummy Connection" in Apache

Source: Internet
Author: User
Tags apache log file apache log

Apache 2.x keeps child processes alive by creating internal connections which appear in the log files as "internal dummy C Onnection "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 the Prevent logging for these the IP addresses so your log files won ' t get filled up with these

What's the log lines look like

With IPv6 the log lines come from the IP address:: 1 and would 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 being from the Apache server itself, unless your is doing something special which is requesting Pag Es 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 a entry something along the lines of this, although the exact setting would vary depending on which operating System, distribution and version you is using, or any custom changes you have made:

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

Add this to 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, would no longer be Logge D.

Stop Logging "Internal dummy Connection" in Apache

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.