On 7/27/06, Greg Boug <[EMAIL PROTECTED]> wrote:
Hi guys,
I'm not sure if this one is possible, I'm attempting to use
a mod_rewrite rule to proxy to another URL, but for the
request it proxies to, I need it to keep the original source
IP address intact. At present, I have something along the
lines of:
RewriteRule "^/$" http://server.com/startup/now?a=b [P,L,QSA]
Now this works and does what is required, with the exception
that the request to /startup/now?a=b has the source IP
address of the apache server where the Rewrite rule exists.
Is there any way that I can pass through the original source
IP address in a fashion that it will be recognised as the
remote address? I think we are checking this via the REMOTE_ADDR
environment variable...
Oh, and one more thing, just to make life a little more fun:
we can't just use a 30x redirect.
The proxy sends the X-Forwarded-For request header containing the
original IP address. You can use that on the origin server. If you
need to lie to the origin server about the REMOTE_ADDR itself, see the
mod_extract_forwarded third-party module.
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]