Re: [users@httpd] Mod_rewrite proxying source ip address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/27/06, Greg Boug <gregb@xxxxxxxxxxx> 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: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux