Main Content

Apache Internal Dummy Connection - what is it and what should I do with it?

Archive - Originally posted on "The Horse's Mouth" - 2011-09-19 07:52:17 - Graham Ellis

When the Apache HTTP Server manages its child processes, it needs a way to wake up processes that are listening for new connections. To do this, it sends a simple HTTP request back to itself. This request will appear in the access_log file ... typically from 127.0.0.1 or your server's IP address. For example:

  83.170.93.77 - - [16/Sep/2011:03:30:02 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"

These requests are perfectly normal and you do not, in general, need to worry about them. They can simply be ignored. They should certainly not be "counted" as web site hits in any shape or form! If you wish to exclude them from your log, you can use normal conditional-logging techniques. For example:

  SetEnvIf Remote_Addr "83\.170\.93\.77" loopbackaccess
  CustomLog logs/access_log combined env=!loopbackaccess


And remember to stop and restart your server to pick up the new configuration file!




Aside ... the difference between counting the number of hits and the number of unique visitors - analysis of a log file of ours from a day last week:

  -bash-3.2$ wc ac_20110914
   120924 2271108 27668240 ac_20110914
  -bash-3.2$ perl -na -e '$n{$F[0]}++;END{print 0+keys(%n),"\n";}' ac_20110914
  9744
  -bash-3.2$


Translating that ...
27 Mbyte log file
120,924 requests received
9,744 different hosts requesting data

As ever, statistics hide a multitude of sins. The "different hosts" will include one for the internal dummy connection (unless you have disabled it) and a number for crawlers, which may (or be may not) be something you really want to count. However, it will only count one for all the machines behind a router which - for visitors from Well House Manor - means that all delegates on courses will appear to be the same person.