views:

313

answers:

2

Hi,

I just moved my apache/mongrel setups to use passenger and I started noticing my index page is getting hit pretty aggressively (approx 5000 hits a day)

I chucked in some logging and it turns out the ip address (REMOTE_ADDR) is showing up as "::1" for these hits.

Has anyone seen this kind of activity? There must be a reason for it. Is there any setting I forgot to configure or set?

EDIT

Thanks Gavin, it looks like this is the dummy connection. Now the question is how I go about disabling it, Passenger conflicts with mod rewrite

I just posted a question on the passenger news group (may take a few mins to show up), will update this as soon as I hear back.

UPDATE 2

These 3 lines in my Apache configuration solve the issue:

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

I am trying to find out if this belongs in passenger or is a bug local to my setup.

A: 

Do you have some type of monitoring system hitting the web server? I've used Passenger for months and haven't seen this.

Matt Darby
+2  A: 

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

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.

You can filter them using mod_rewrite, SetEnvIf or a regular expression on the User-Agent (look for "internal dummy connection").

Looks like this is the reason, expanded my question
Sam Saffron