Welcome! Log In Create A New Profile

Advanced

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

All files from this thread

File Name File Size   Posted by Date  
mod_rpaf.png 8.5 KB open | download Jim Ohlstein 08/30/2011 Read message
August 30, 2011 07:16PM
On 8/30/11 5:50 PM, Maxim Dounin wrote:
> Hello!
>
> On Tue, Aug 30, 2011 at 04:17:52PM -0400, Jim Ohlstein wrote:
>
>> On 8/30/11 2:29 PM, Albuquerque Rui wrote:
>
> [...]
>
>>>>> Changes done, nothing changed.. Still the same problem...The fact is
>>> that it seems mod_rpaf is working well because REMOTE_ADDR is good, but
>>> REMOTE_HOST is not good :( :( :(
>>
>>
>> I agree. It is not resolving the IP incorrectly. It is not an issue with
>> nginx or with mod_rpaf.
>
> As I wrote in my original reply...
>
>>> > > I.e. client's ip is correct, but client's hostname still points to
>>> > > your webserver, right? This looks like problem in mod_rpaf.
>
> ... this is obviously a problem in mod_rpaf. It fails to change
> ip *before* resolving happens in Apache. (No idea if it's actually
> possible to implement this correctly though.)

Maxim, we could argue this pedantically all night long and never agree.
However, mod_rpaf is doing exactly what it's designed to do which is to
report the remote IP address correctly. HostNameLookups is *not* a
function of mod_rpaf, it is a function of Apache core.

However... the function works properly in *my* testing as follows.

I created a small php script as follows:

<?php

print ('Your IP is "'.$_SERVER['REMOTE_ADDR'].'". ');

print ('Your Host is "'.$_SERVER["REMOTE_HOST"].'".');

?>

I turned on "HostNameLookups" in Apache.

Attached is the result.

This is indeed my IP and host.

Why it's not working for the OP I cannot explain, but it does seem to
work *correctly* as does "HostNameLookups" directive.


>
> Maxim Dounin
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx


--
Jim Ohlstein
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Attachments:
open | download - mod_rpaf.png (8.5 KB)
Subject Author Posted

Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 30, 2011 12:08PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Maxim Dounin August 30, 2011 12:22PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 30, 2011 12:24PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Igor Sysoev August 30, 2011 12:36PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 30, 2011 12:46PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Jim Ohlstein August 30, 2011 12:46PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 30, 2011 12:48PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Jim Ohlstein August 30, 2011 01:40PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 30, 2011 02:30PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Jim Ohlstein August 30, 2011 04:20PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Maxim Dounin August 30, 2011 05:52PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug Attachments

Jim Ohlstein August 30, 2011 07:16PM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 31, 2011 02:36AM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 31, 2011 03:04AM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Gena Makhomed August 31, 2011 07:00AM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Albuquerque Rui August 31, 2011 08:00AM

Re: Nginx + apache : REMOTE_ADDR and REMOTE_HOST bug

Gena Makhomed August 31, 2011 08:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 316
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready