William McKee wrote:
On Wed, Feb 16, 2005 at 04:06:39PM -0500, Stas Bekman wrote:

whereas Apache-Test sees 127.0.0.1. I suppose 166.70.252.34
is the external IP of the same machine.


Yes, it is (though keep in mind that this is a virtual server running as
a jailed process, not a separate machine).

That could be the reason.

Try to debug our_remote_addr() in Apache/TestConfig.pm to figure out why there is a difference (most likely it defaults to resolving 'localhost')

OK, here's a dump of the gethostbyname function:

  # ghbn = $VAR1 = [
  'localhost',
    'localhost.my.domain',
    2,
    4,
    ''
    ];

The last item in the list is showing up in an odd format which I'm not
able to reproduce here (perhaps this is an opaque string?). At any rate,
remote_addr is empty so the value that is being returned by
our_remote_addr() is coming from passing the iaddr value to
Socket::inet_ntoa. Here's the relevant contents of my /etc/hosts:

  ::1                     localhost localhost.my.domain
  127.0.0.1               localhost localhost.my.domain

I tried removing that first entry but it made no difference. This is
definitly beyond my level of knowledge so hopefully you can give me some
further pointers for what to look at next.

Well, basically you want to figure out how to make Apache-Test see the same value as Apache. i.e. teach our_remote_addr() to get the same value.


--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to