httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: [users@httpd] Passing REMOTE_ADDR in a ProxyPass
Date Tue, 29 Jul 2003 17:08:47 GMT

On Tue, 29 Jul 2003, Garth Winter Webb wrote:
>     RewriteRule ^/(.*) http://localhost:8525/$1
> [P,E=REMOTE_ADDR:env=REMOTE_ADDR]

No way that will work.  For starters, environment variables are certainly
not passed in http request; they are local to the server where they are
set.

What you want is to upgrade to have the X-Forwarded-For HTTP header added
to the requests.  I believe that apache 2 does this automatically.  For
1.3, you can look at
http://develooper.com/code/mpaf/mod_proxy_add_forward.c

Once you have that, you can put it in your logfile using the format string
%{X-Forwarded-For}i

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message