You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Yong Liang <YL...@opsware.com> on 2007/05/16 08:32:54 UTC
[users@httpd] how to preserve remote_host/addr when using proxy
Hi all,
We're using a reverse proxy to redirect access to java servlets listening on port 9080. The problem is all http requests received by servlets have remote_addr set to 127.0.0.1. Is there a way to configure the proxy to keep the original ip/host when redirecting?
Thanks,
Yong
Re: [users@httpd] how to preserve remote_host/addr when using proxy
Posted by Ion Alexandru Morega <al...@iem.pub.ro>.
On 16 May 2007, at 09:32, Yong Liang wrote:
> Hi all,
>
> We're using a reverse proxy to redirect access to java servlets
> listening on port 9080. The problem is all http requests received
> by servlets have remote_addr set to 127.0.0.1. Is there a way to
> configure the proxy to keep the original ip/host when redirecting?
>
> Thanks,
> Yong
>
Hi,
I would suggest mod_jk - it works for Tomcat, I don't know about
other servlet containers, but it's worth a shot.
http://tomcat.apache.org/connectors-doc/
Cheers,
-- Alex
---------------------------------------------------------------------
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
RE: [users@httpd] how to preserve remote_host/addr when using proxy
Posted by Yong Liang <YL...@opsware.com>.
Maybe it's x-forwarded-for mentioned by Gergely. I'm going to give this
a try, and take a look at mod_jk suggested by Alex.
Thank you all for the help,
Yong
> -----Original Message-----
> From: Russ [mailto:rsivak@istandfor.com]
> Sent: Wednesday, May 16, 2007 9:12 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] how to preserve remote_host/addr
> when using proxy
>
> I had the same problem and ended up writing a java filter for
> my jrun server that replaces the remote_ip with the
> proxied_for value that apache sets (not sure of the exact
> variable names now, as I'm not in front of a pc.
>
> Russ
> Sent wirelessly via BlackBerry from T-Mobile.
>
> -----Original Message-----
> From: "Yong Liang" <YL...@opsware.com>
> Date: Tue, 15 May 2007 23:32:54
> To:<us...@httpd.apache.org>
> Subject: [users@httpd] how to preserve remote_host/addr when
> using proxy
>
> Hi all,
>
> We're using a reverse proxy to redirect access to java
> servlets listening on port 9080. The problem is all http
> requests received by servlets have remote_addr set to
> 127.0.0.1. Is there a way to configure the proxy to keep the
> original ip/host when redirecting?
>
> Thanks,
> Yong
>
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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
Re: [users@httpd] how to preserve remote_host/addr when using proxy
Posted by Russ <rs...@istandfor.com>.
I had the same problem and ended up writing a java filter for my jrun server that replaces the remote_ip with the proxied_for value that apache sets (not sure of the exact variable names now, as I'm not in front of a pc.
Russ
Sent wirelessly via BlackBerry from T-Mobile.
-----Original Message-----
From: "Yong Liang" <YL...@opsware.com>
Date: Tue, 15 May 2007 23:32:54
To:<us...@httpd.apache.org>
Subject: [users@httpd] how to preserve remote_host/addr when using proxy
Hi all,
We're using a reverse proxy to redirect access to java servlets listening on port 9080. The problem is all http requests received by servlets have remote_addr set to 127.0.0.1. Is there a way to configure the proxy to keep the original ip/host when redirecting?
Thanks,
Yong
---------------------------------------------------------------------
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
Re: [users@httpd] how to preserve remote_host/addr when using proxy
Posted by POLONKAI Gergely <po...@w00d5t0ck.info>.
Hello Yong,
As far as I remember, in these cases, you have the X-Forwarded-For:
header, which contains the original host, if this solution is good for
you...
Rgds,
Gergely
Yong Liang írta:
>
> Hi all,
>
> We're using a reverse proxy to redirect access to java servlets
> listening on port 9080. The problem is all http requests received by
> servlets have remote_addr set to 127.0.0.1. Is there a way to
> configure the proxy to keep the original ip/host when redirecting?
>
> Thanks,
> Yong
>