Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A9CD0100F0 for ; Fri, 25 Oct 2013 13:16:42 +0000 (UTC) Received: (qmail 84768 invoked by uid 500); 25 Oct 2013 13:16:39 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 84738 invoked by uid 500); 25 Oct 2013 13:16:38 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 84730 invoked by uid 99); 25 Oct 2013 13:16:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Oct 2013 13:16:37 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yehuda@ymkatz.net designates 209.85.219.53 as permitted sender) Received: from [209.85.219.53] (HELO mail-oa0-f53.google.com) (209.85.219.53) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Oct 2013 13:16:33 +0000 Received: by mail-oa0-f53.google.com with SMTP id n12so877427oag.40 for ; Fri, 25 Oct 2013 06:16:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:dkim-signature:mime-version:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=Qa9nIiSHRPFkoK8TwIZF/3MXWFMvQeJ66F516SpvhTE=; b=C7CMaBUL1asJPMJQoBF+bzyIVWpHh8UwpHtLovRC/AvkIHL9B5GlIGGLX+Sknrop4H pPCXCLNcXL4dkN6Fy/qLVv57O0dgjkCeOj5aBZhqWnCoKmZpIOsgKFPdylkB+8/nJq72 vPwxLF/DVG47NkEfNkYU6rI0tohHjs+QZLMEOa8HKjtOGn1kgxNma1uorr4QPbna4v7V YDFdTvS4xo7jhKzb23wfv34YPYd1m/cJ8YRay1jRUpOE29W0GPHdxEBjuhxIgk6DzkNU OY+XKEGiJOTC7VLtoiRih/vkvt5u8kW1hl1sV5pCVMJBft0RaLZbLGfooE6QR+U7UpG9 L9Aw== X-Gm-Message-State: ALoCoQlH9GFcgLByt49h7/RcqQ47YBbKJMpqYZJpXcm+BZtp1ON+Sz6gUah4VeDQ5PDE8sgEcIBb X-Received: by 10.182.129.201 with SMTP id ny9mr3136468obb.0.1382706972503; Fri, 25 Oct 2013 06:16:12 -0700 (PDT) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [2607:f8b0:4001:c03::235]) by mx.google.com with ESMTPSA id hl3sm5412312obb.0.2013.10.25.06.16.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Oct 2013 06:16:11 -0700 (PDT) Received: by mail-ie0-f181.google.com with SMTP id ar20so6495977iec.12 for ; Fri, 25 Oct 2013 06:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymkatz.net; s=g; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Qa9nIiSHRPFkoK8TwIZF/3MXWFMvQeJ66F516SpvhTE=; b=Rw5MxSItY7hOwaZHW3VtHVWu0DdqWBHhlDvpC3cAjr8G39NcLKyQoiIr6pzSdl/tta c7P8U0c6de049TKN+9Ovsdr6xqzAWJXRPQhF6sUhynoCo4o/CnKAZt3wuDyxHzG4VZck HZe+QS2TII+deW2YyRAbVyJl8a33WYW6Y9Yi8= MIME-Version: 1.0 X-Received: by 10.50.97.7 with SMTP id dw7mr2199364igb.2.1382706971182; Fri, 25 Oct 2013 06:16:11 -0700 (PDT) Received: by 10.43.155.131 with HTTP; Fri, 25 Oct 2013 06:16:10 -0700 (PDT) In-Reply-To: <602090762.8202.1382702962915.JavaMail.root@electrichendrix.com> References: <46338965.7430.1382664602348.JavaMail.root@electrichendrix.com> <605783640.7436.1382664755929.JavaMail.root@electrichendrix.com> <602090762.8202.1382702962915.JavaMail.root@electrichendrix.com> Date: Fri, 25 Oct 2013 09:16:10 -0400 Message-ID: From: Yehuda Katz To: "users@httpd.apache.org" Content-Type: multipart/alternative; boundary=047d7b10c853d8927204e9908d45 X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] X-Forwarded-For --047d7b10c853d8927204e9908d45 Content-Type: text/plain; charset=ISO-8859-1 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- > > 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 > > 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. --047d7b10c853d8927204e9908d45 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I thought each section has non-mod_cloudflare workarounds - I see only some= do.
The Apache documentation for mod_proxy has a suggestion for changi= ng the format of the log file (can paste=A0a link from this device, but it = should e easy enough to find) to also include the header, but if you want t= o 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 w= rote:
>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 ser= vers:=A0h= ttps://support.cloudflare.com/hc/en-us/sections/200038166-How-do-I-restore-= original->visitor-IP-to-my-server-logs-


--
Sent fro= m a gizmo with a very small keyboard and hyper-active auto-correct.
--047d7b10c853d8927204e9908d45--