Monday, 21 October 2013

Apache (internal dummy connection)

Today i checked my apache log file in my server and  found lot of  "internal dummy connection". That is like below

          [root@server ~]# cat /var/log/httpd/access_log


 - - [21/Oct/2013:23:21:14 +0530] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
 - - [21/Oct/2013:23:22:21 +0530] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
 - - [21/Oct/2013:23:22:49 +0530] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
 - - [21/Oct/2013:23:23:51 +0530] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
 - - [21/Oct/2013:23:24:53 +0530] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
 - - [21/Oct/2013:23:25:10 +0530] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
 - - [21/Oct/2013:23:32:32 +0530] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
 - - [21/Oct/2013:23:32:34 +0530] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
 - - [21/Oct/2013:23:34:05 +0530] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
 - - [21/Oct/2013:23:34:06 +0530] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
 - - [21/Oct/2013:23:34:32 +0530] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"


I want to ignore above log from access.log file . So i searched and found solution for "internal dummy connection"

Solution :


    I added below lines in "httpd.conf" file

             [root@server ~]# vim /etc/httpd/conf/httpd.conf

                          SetEnvIf Remote_Addr "127\.0\.0\.1" loopback
                          SetEnvIf Remote_Addr "::1" loopback
                          SetEnvIf User-Agent ".*internal dummy connection.*" loopback
                          CustomLog logs/access_log combined env=!loopback

              :wq

     After i restarted  the httpd service

            [root@server ~]# /etc/init.d/httpd restart

My issue resolved.....


2 comments:

  1. I am getting same:

    ::1 - - [12/Jun/2014:12:42:51 -0400] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"


    However - How would I put this in:

    SetEnvIf Remote_Addr "127\.0\.0\.1" loopback
    SetEnvIf Remote_Addr "::1" loopback
    SetEnvIf User-Agent ".*internal dummy connection.*" loopback
    CustomLog logs/access_log combined env=!loopback

    :wq

    That you say?

    ReplyDelete
    Replies
    1. If you are using virtualhost, then your apache configuration file like this

      # vim /etc/httpd/conf/http.conf

      # Go to end of the line


      DocumentRoot /var/www/html
      ServerName test.com
      ServerAlias www.test.com
      ErrorLog logs/error_log

      SetEnvIf Remote_Addr "127\.0\.0\.1" loopback
      SetEnvIf Remote_Addr "::1" loopback
      SetEnvIf User-Agent ".*internal dummy connection.*" loopback
      CustomLog logs/access_log combined env=!loopback



      If you are not using virtualhost, then edit the apache configuration file

      # vim /etc/httpd/conf/http.conf

      # Go to line no: 492

      SetEnvIf Remote_Addr "127\.0\.0\.1" loopback
      SetEnvIf Remote_Addr "::1" loopback
      SetEnvIf User-Agent ".*internal dummy connection.*" loopback

      # Go to line no: 526

      CustomLog logs/access_log combined env=!loopback

      After that you want to restart the service

      # service httpd restart

      Delete