10

I installed a fresh Ubuntu 12.04 Server + Zend Server CE (MySQL / PHPmyadmin) from deb http://repos.zend.com/zend-server/5.6.0_ubuntu1204/deb server non-free Repository.

My apache2/access.log looks like this and grooving every few seconds:

::1 - - [06/Aug/2012:13:27:59 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
::1 - - [06/Aug/2012:13:27:59 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
::1 - - [06/Aug/2012:13:27:59 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
::1 - - [06/Aug/2012:13:28:00 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
::1 - - [06/Aug/2012:13:28:00 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
::1 - - [06/Aug/2012:13:28:00 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
::1 - - [06/Aug/2012:13:28:00 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
::1 - - [06/Aug/2012:13:28:00 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
223.255.255.1 - - [06/Aug/2012:13:28:08 +0200] "HEAD / HTTP/1.1" 200 276 "-" "-"
223.255.255.1 - - [06/Aug/2012:13:28:13 +0200] "HEAD / HTTP/1.1" 200 276 "-" "-"
223.255.255.1 - - [06/Aug/2012:13:28:18 +0200] "HEAD / HTTP/1.1" 200 276 "-" "-"
223.255.255.1 - - [06/Aug/2012:13:28:23 +0200] "HEAD / HTTP/1.1" 200 276 "-" "-"
223.255.255.1 - - [06/Aug/2012:13:28:28 +0200] "HEAD / HTTP/1.1" 200 276 "-" "-"
223.255.255.1 - - [06/Aug/2012:13:28:33 +0200] "HEAD / HTTP/1.1" 200 276 "-" "-"
223.255.255.1 - - [06/Aug/2012:13:28:38 +0200] "HEAD / HTTP/1.1" 200 276 "-" "-"
223.255.255.1 - - [06/Aug/2012:13:28:43 +0200] "HEAD / HTTP/1.1" 200 276 "-" "-"
223.255.255.1 - - [06/Aug/2012:13:28:48 +0200] "HEAD / HTTP/1.1" 200 276 "-" "-"
223.255.255.1 - - [06/Aug/2012:13:28:53 +0200] "HEAD / HTTP/1.1" 200 276 "-" "-"
223.255.255.1 - - [06/Aug/2012:13:28:58 +0200] "HEAD / HTTP/1.1" 200 276 "-" "-"

Do you know why and how to prevent it?

4 Answers 4

8

You need to make some changes in /etc/apache2/apache2.conf, specifically:

  1. Create some environment tests with SetEnvIf, and;

  2. Then, use them on the CustomLog line. As follows:

     SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
     SetEnvIf Remote_Addr "::1" dontlog
     SetEnvIf User-Agent ".*internal dummy connection.*" dontlog
    
     CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined env=!dontlog
    

    That last line should already be in the file, just without the last bit.

Note that this will set the dontlog environment variable if either of the 3 SetEnvIf conditions are true. To avoid this, well, it's complicated; but this blog seems to have a solution.

3
  • 1
    instead of editing /etc/apache2/apache2.conf I've edited /etc/apache2/conf.d/other-vhosts-access-log because I didn't find "CustomLog" in the first config file. Thanks and hope it helps May 10, 2013 at 11:10
  • Note one may have to add LoadModule setenvif_module and AddModule mod_setenvif.c to httpd.conf file--ref httpd.apache.org/docs/2.2/mod/mod_setenvif.html
    – MarkHu
    Jun 5, 2015 at 22:29
  • Now it is on /etc/apache2/conf-available/other-vhosts-access-log.conf, where Define an access log for VirtualHosts that don't define their own logfile (should be a symlink in conf-enabled) Feb 19 at 18:51
2

This is Apache own doing for keeping processes live.

http://wiki.apache.org/httpd/InternalDummyConnection

http://www.electrictoolbox.com/apache-stop-logging-internal-dummy-connection/

1
  • 3
    Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Aug 10, 2012 at 9:35
1

check here. http://www.cathaycenturies.com/blog/?p=420

I think you need modify

/etc/apache2/sites-available/default

in order to make it work.

1
  • 3
    Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Jun 26, 2013 at 1:05
0

This is work for me

SetEnvIf Remote_Addr "127\.0\.0\.1" loopback
CustomLog logs/access_log combined env=!loopback

I hope this work you too.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .