I just migrated my VPS from RHEL4 distro to CentOS 5.3 Running on PHP 5.2.9 and MySQL 5.1.3

I had Drupal 5.10 and noticed that I was getting these empty warnings (in the watchdog logs) "page not found" with Message *, Location * and Hostname ::1. I looked into the Apache error log and saw this repeating a few times per minute as well:

[Fri Apr 24 13:28:32 2009] [error] [client ::1] PHP Notice: Undefined index: HTTP_HOST in /var/www/html/includes/bootstrap.inc on line 204
[Fri Apr 24 13:28:32 2009] [error] [client ::1] PHP Notice: Undefined index: HTTP_HOST in /var/www/html/includes/bootstrap.inc on line 209
[Fri Apr 24 13:28:32 2009] [error] [client ::1] PHP Notice: Undefined index: HTTP_HOST in /var/www/html/includes/bootstrap.inc on line 266

I know I didn't have it before I migrated to CentOS. Anyway, I went ahead and updated to Drupal 5.16 just to make sure everything is up to date, but that didn't help as far as the messages in the log files.

I changed Options -Indexes to Options +Indexes in my .htaccess file, but that didn't seem to help either. While I was poking around my Apache settings I noticed that the apache log stopped producing those error messages. I didn't change any setting in the Apache though, so I don't know if it's temporarily or for good. The Drupal's watchdog still shows the same warnings being produced 7 times per minute, so I assume nothing has really changed.

Any ideas on what it is and how to possibly fix it?

Comments

gemini’s picture

No one has a clue?

msupko’s picture

Old issue, I know, but I'm dealing with this too and information is proving hard to come by. It has something to do with Apache's Internal Dummy Connection:

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

This is a normal function of Apache, and totally harmless, but it shouldn't be reaching the watchdog logs. FWIW, we're also using CentOS. If we solve this I'll post the solution.

beanjammin’s picture

On servers with SSL support the order of apache's "Listen
" directive is important (this information is from the http://wiki.apache.org/httpd/InternalDummyConnection link msupko posted). The internal dummy connection doesn't speak SSL, but will try to connect to the port configured last in the apache configuration file. If you have "Listen 443" set below "Listen 80" you will see these dummy connection attempts in the Watchdog log.

I'm not sure if I am dealing with a stock CentOS/RHEL apache config, but in my case the /etc/httpd/conf.d/ssl.conf file (where apache's SSL configuration lives and most importantly where the "Listen 443" directive is) was being included in the /etc/httpd/conf/httpd.conf file *after* the "Listen 80" directive. This caused the internal dummy connection to use port 443 instead of 80.

Moving the "Listen 80" directive to below where the ssl.conf file was being included and reloading apache fixed the issue.

gemini’s picture

Good catch - this solved my issue.

geerlingguy’s picture

Having the same problem as well, since upgrading to CentOS 5.3 on a Slicehost VPS.

__________________
Personal site: www.jeffgeerling.com

jeffschuler’s picture

This is Apache making a request to itself to wake up a child process, (see InternalDummyConnection like msupko mentioned.)

We don't want Drupal to process these; that puts unnecessary load on the server.

From Racker Hacker: Apache 2.2: internal dummy connection, Add:

RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]

to your rewrite rules (in your .htaccess file, for instance,) to make these requests generate a 403 error instead of being sent to and handled by Drupal.

Seeing lots of these messages seems to be an indication that Apache's MaxServers, MaxClients, etc., should be tweaked.

Check out What is the issue with Apache internal dummy connection? as well as the awesome Drupal performance articles at 2bits.