You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Arnold <ca...@electrichendrix.com> on 2013/10/25 03:32:35 UTC

[users@httpd] X-Forwarded-For

Apache 2.2 (i believe) on sles11. We have some servers behind our apache (reverse) proxy. When connections come in to apache and apache proxies the connections, the logs show the apache proxy ip. We need to see the originating ip. I have seen on the internet that x-forwarded-for will do this. Can anyone provide some config doc or guidance for x-forwarded-for?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] X-Forwarded-For

Posted by Yehuda Katz <ye...@ymkatz.net>.
I thought each section has non-mod_cloudflare workarounds - I see only some
do.
The Apache documentation for mod_proxy has a suggestion for changing the
format of the log file (can paste a link from this device, but it should e
easy enough to find) to also include the header, but if you want to replace
the client IP, you will need some kind of module or code change (there are
others besides the cloudflare one).

- Y

On Friday, October 25, 2013, Chris Arnold wrote:

> >The X-Forwarded-For header is set by Apache automatically (
> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers). Your
> inside servers need to know to use it. >CloudFlare has some documentation
> about how to handle this on different servers:
> https://support.cloudflare.com/hc/en-us/sections/200038166-How-do-I-restore-original->visitor-IP-to-my-server-logs-<https://support.cloudflare.com/hc/en-us/sections/200038166-How-do-I-restore-original-visitor-IP-to-my-server-logs->
>
> Thanks Yehuda! Cloudflare wants you to install its mod. Is it possible to
> use what i already have to do this, which is apache?
>
>
>
> On Thu, Oct 24, 2013 at 9:32 PM, Chris Arnold <carnold@electrichendrix.com<javascript:_e({}, 'cvml', 'carnold@electrichendrix.com');>
> > wrote:
>
>> Apache 2.2 (i believe) on sles11. We have some servers behind our apache
>> (reverse) proxy. When connections come in to apache and apache proxies the
>> connections, the logs show the apache proxy ip. We need to see the
>> originating ip. I have seen on the internet that x-forwarded-for will do
>> this. Can anyone provide some config doc or guidance for x-forwarded-for?
>>
>>
>
>

-- 
Sent from a gizmo with a very small keyboard and hyper-active auto-correct.

Re: [users@httpd] X-Forwarded-For

Posted by Chris Arnold <ca...@electrichendrix.com>.
> The X-Forwarded-For header is set by Apache automatically ( http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers ). Your inside servers need to know to use it. >CloudFlare has some documentation about how to handle this on different servers: https://support.cloudflare.com/hc/en-us/sections/200038166-How-do-I-restore-original->visitor-IP-to-my-server-logs- 

Thanks Yehuda! Cloudflare wants you to install its mod. Is it possible to use what i already have to do this, which is apache? 



On Thu, Oct 24, 2013 at 9:32 PM, Chris Arnold < carnold@electrichendrix.com > wrote: 


Apache 2.2 (i believe) on sles11. We have some servers behind our apache (reverse) proxy. When connections come in to apache and apache proxies the connections, the logs show the apache proxy ip. We need to see the originating ip. I have seen on the internet that x-forwarded-for will do this. Can anyone provide some config doc or guidance for x-forwarded-for? 







Re: [users@httpd] X-Forwarded-For

Posted by Yehuda Katz <ye...@ymkatz.net>.
The X-Forwarded-For header is set by Apache automatically (
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers). Your inside
servers need to know to use it. CloudFlare has some documentation about how
to handle this on different servers:
https://support.cloudflare.com/hc/en-us/sections/200038166-How-do-I-restore-original-visitor-IP-to-my-server-logs-

- Y


On Thu, Oct 24, 2013 at 9:32 PM, Chris Arnold
<ca...@electrichendrix.com>wrote:

> Apache 2.2 (i believe) on sles11. We have some servers behind our apache
> (reverse) proxy. When connections come in to apache and apache proxies the
> connections, the logs show the apache proxy ip. We need to see the
> originating ip. I have seen on the internet that x-forwarded-for will do
> this. Can anyone provide some config doc or guidance for x-forwarded-for?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>