Keep client ip address
Igor Sysoev
is at rambler-co.ru
Sat Dec 30 21:45:04 MSK 2006
On Sat, 30 Dec 2006, Aleksandar Lazic wrote:
> On Sam 30.12.2006 21:26, Igor Sysoev wrote:
>>
>>> I have the following system:
> [snipp]
>>> Is what i want to do possible? Does my approach make sense?
>>
>> nginx passes a client address in X-Real-IP or X-Forwarded-For using
>>
>> proxy_set_header X-Real-IP $remote_addr;
>> proxy_set_header X-Forwarded-For
>> $proxy_add_x_forwarded_for;
>>
>> On Apache side you need to set mod_rpaf ( http://stderr.net/apache/rpaf/ )
>
> or you change %h with %{X-Real-IP}i or with %{X-Forwarded-For}i
>
> http://httpd.apache.org/docs/2.2/mod/mod_log_config.html
>
>> On nginx side you do not need
>>
>> set_real_ip_from 192.168.1.0/24;
>> real_ip_header X-Real-IP;
>>
>> They do the same thing as mod_rapf for Apache.
>
> I think the realip_module isn't build by default, isn't it?!
Yes, it is not build by default.
> If not then don't forget to give --with-http_realip_module option to
> ./configure ;-)
No, he does not need the module.
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list