httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
Subject Re: [users@httpd] Reverse Proxy - Client IP
Date Fri, 28 Sep 2007 12:56:37 GMT
On 9/28/07, K Anand <> wrote:
> I'm  using  apache 1.3.xx...I know it is way too old...
> My situation is as follows :
> Client   <----->   Apache      <------------>  Apache
>                          (Rev Proxy)                       (Backend)
> I have got access to CGI env vars on the Backend apache in my application. I
> would like to get the client IP there.
> I have tried this :
> SetEnv REMOTE_IDENT %{X-Forwarded-For}i
> and tried to access REMOTE_IDENT  in my application...But i get
> %{X-Forwarded-For}i and not the value ...

SetEnv can't do that. SetEnvIf might be able to (with a suitable
change in syntax -- see the docs), or you could use mod_rewrite. But
why are you bothering? Your application should be able to directly
access X-Forwarded-For.

(Also, careful using X-Forwarded-For because it could contain more
than one IP address in the case of a chain of proxies.)


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message