<br><br><div class="gmail_quote">2011/8/31 Albuquerque Rui <span dir="ltr"><<a href="mailto:saiaman01@gmail.com">saiaman01@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote"><div><div></div><div class="h5">2011/8/31 Jim Ohlstein <span dir="ltr"><<a href="mailto:jim@ohlste.in" target="_blank">jim@ohlste.in</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On 8/30/11 5:50 PM, Maxim Dounin wrote:<br>
> Hello!<br>
><br>
> On Tue, Aug 30, 2011 at 04:17:52PM -0400, Jim Ohlstein wrote:<br>
><br>
>> On 8/30/11 2:29 PM, Albuquerque Rui wrote:<br>
><br>
> [...]<br>
><br>
>>>>> Changes done, nothing changed.. Still the same problem...The fact is<br>
>>> that it seems mod_rpaf is working well because REMOTE_ADDR is good, but<br>
>>> REMOTE_HOST is not good :( :( :(<br>
>><br>
>><br>
>> I agree. It is not resolving the IP incorrectly. It is not an issue with<br>
>> nginx or with mod_rpaf.<br>
><br>
> As I wrote in my original reply...<br>
><br>
>>> > > I.e. client's ip is correct, but client's hostname still points to<br>
>>> > > your webserver, right? This looks like problem in mod_rpaf.<br>
><br>
> ... this is obviously a problem in mod_rpaf. It fails to change<br>
> ip *before* resolving happens in Apache. (No idea if it's actually<br>
> possible to implement this correctly though.)<br>
<br>
</div>Maxim, we could argue this pedantically all night long and never agree.<br>
However, mod_rpaf is doing exactly what it's designed to do which is to<br>
report the remote IP address correctly. HostNameLookups is *not* a<br>
function of mod_rpaf, it is a function of Apache core.<br>
<br>
However... the function works properly in *my* testing as follows.<br>
<br>
I created a small php script as follows:<br>
<br>
<?php<br>
<br>
print ('Your IP is "'.$_SERVER['REMOTE_ADDR'].'". ');<br>
<br>
print ('Your Host is "'.$_SERVER["REMOTE_HOST"].'".');<br>
<br>
?><br>
<br>
I turned on "HostNameLookups" in Apache.<br>
<br>
Attached is the result.<br>
<br>
This is indeed my IP and host.<br>
<br>
Why it's not working for the OP I cannot explain, but it does seem to<br>
work *correctly* as does "HostNameLookups" directive.<br>
<div><br>
<br></div></blockquote></div></div><div><br>>> While accessing the page directly from apache i've got the good values too. But when i pass by nginx then apache ( mod_rpaf ) the hostname is not right :(<br><br></div>
</div></blockquote><div><br>I've patched the thing with a php script. In fact i don't really need hostname everywhere and hostnamelookups is activated only for some vhosts. So this is the patch :<br><br><a href="http://pastebin.com/4HmX790g">http://pastebin.com/4HmX790g</a><br>
<br><br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_quote"><div> </div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<div>
><br>
> Maxim Dounin<br>
><br>
> _______________________________________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
<br>
<br>
</div>--<br>
<font color="#888888">Jim Ohlstein<br>
</font><br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
<br></blockquote></div></div><br>
</blockquote></div><br>