On Wed, 15 Jun 2005, Werner Schalk wrote:
> I do use mod_proxy as a reverse / forward proxy as follows:
>
> Inet -> Server (public IP, Apache 2) -> Internal Server (same system, virtual
> server using Linux vserver - private IP address, Apache 2)
>
> Now all the requests that are send to the public IP address are forwarded to
> the internal server(s). The problem is that the original IP of the remote
> client is not passed to the internal server so for the internal servers it
> looks like the public server is making all the requests. My question now is:
> How can I pass the remote_addr of the client making the request to the
> internal server using mod_rewrite or mod_proxy? I mean I want the IP not only
> to be logable inside the virtual server (with the private ip) but also I
> would like PHP scripts etc. to correctly get the IP's of the remote clients.

Have you tried looking at the X-Forwarded-For header? (Appears in CGI
scripts as HTTP_X_FORWARDED_FOR) This is passed automatically by
mod_proxy, as far as I know.

Cheers,

David Adam
[EMAIL PROTECTED]


---------------------------------------------------------------------
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]

Reply via email to