You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ask Bjoern Hansen <as...@develooper.com> on 2002/07/21 07:39:58 UTC
mod_proxy_add_forward.c
Hi,
As you may know then the proxy module in httpd 2.0 incorporates the
X-Forwarded-For, X-Forwarded-Host and X-Forwarded-Server
functionality of mod_proxy_add_forward.c.
I just noticed that Thomas Eibner got the proxy people to put it
into apache 1.3 too since 1.3.25. Yay. :-)
mod_proxy even seems to figure it out on it's own when it's doing a
"reverse proxy" request.
- ask (working on his performance tuning talk for oscon)
--
ask bjoern hansen, http://askbjoernhansen.com/ !try; do();
Re: mod_proxy_add_forward.c
Posted by Thomas Eibner <th...@stderr.net>.
On Mon, Jul 22, 2002 at 10:47:35AM +1000, Jie Gao wrote:
> That's great. But what I am after is the difference between
To me it seemed like you expected something magically to appear in your
access logs, so sorry.
> X-Forwarded-For
The ip of the remote client
> X-Forwarded-Host
The Host originally requested by the client
> X-Forwarded-Server
The actual served "server-hostname" on the frontend server.
--
Thomas Eibner <http://thomas.eibner.dk/> DnsZone <http://dnszone.org/>
mod_pointer <http://stderr.net/mod_pointer> <http://photos.eibner.dk/>
!(C)<http://copywrong.dk/> <http://apachegallery.dk/>
Putting the HEST in .COM <http://www.hestdesign.com/>
Re: mod_proxy_add_forward.c
Posted by Jie Gao <J....@isu.usyd.edu.au>.
On Mon, 22 Jul 2002, Thomas Eibner wrote:
> On Mon, Jul 22, 2002 at 08:34:08AM +1000, Jie Gao wrote:
> > On Sat, 20 Jul 2002, Ask Bjoern Hansen wrote:
> >
> > > As you may know then the proxy module in httpd 2.0 incorporates the
> > > X-Forwarded-For, X-Forwarded-Host and X-Forwarded-Server
> > > functionality of mod_proxy_add_forward.c.
> >
> > What are the differences between them?
>
> I believe there is a difference in what headers was decided on to send in
> mod_proxy.
>
> mod_proxy_add_forward.c:
> X-Forwarded-For
> X-Host
> X-Server-Hostname
> mod_proxy:
> X-Forwarded-For
> X-Forwarded-Host
> X-Forwarded-Server
>
> > I have:
> >
> > ProxyPass /my-bin/ http://127.0.0.1:8081/my-bin/
> > ProxyPassReverse /my-bin/ http://127.0.0.1:8081/my-bin/
> >
> > and I still see
> >
> > 127.0.0.1 - - [22/Jul/2002:08:32:53 +1000] "GET /my-bin ....
>
> That's what's supposed to happen. On the backend you have the headers you
> can use to determine the original client.
>
> I've created a module (both 1.3 and 2.0) to take advantage of the headers
> called mod_rpaf [1] (reverse proxy add forward) in the backend.
That's great. But what I am after is the difference between
X-Forwarded-For
X-Forwarded-Host
X-Forwarded-Server
.
Regards,
Jie
Re: mod_proxy_add_forward.c
Posted by Thomas Eibner <th...@stderr.net>.
On Mon, Jul 22, 2002 at 08:34:08AM +1000, Jie Gao wrote:
> On Sat, 20 Jul 2002, Ask Bjoern Hansen wrote:
>
> > As you may know then the proxy module in httpd 2.0 incorporates the
> > X-Forwarded-For, X-Forwarded-Host and X-Forwarded-Server
> > functionality of mod_proxy_add_forward.c.
>
> What are the differences between them?
I believe there is a difference in what headers was decided on to send in
mod_proxy.
mod_proxy_add_forward.c:
X-Forwarded-For
X-Host
X-Server-Hostname
mod_proxy:
X-Forwarded-For
X-Forwarded-Host
X-Forwarded-Server
> I have:
>
> ProxyPass /my-bin/ http://127.0.0.1:8081/my-bin/
> ProxyPassReverse /my-bin/ http://127.0.0.1:8081/my-bin/
>
> and I still see
>
> 127.0.0.1 - - [22/Jul/2002:08:32:53 +1000] "GET /my-bin ....
That's what's supposed to happen. On the backend you have the headers you
can use to determine the original client.
I've created a module (both 1.3 and 2.0) to take advantage of the headers
called mod_rpaf [1] (reverse proxy add forward) in the backend.
1: http://stderr.net/apache/rpaf/
--
Thomas Eibner <http://thomas.eibner.dk/> DnsZone <http://dnszone.org/>
mod_pointer <http://stderr.net/mod_pointer> <http://photos.eibner.dk/>
!(C)<http://copywrong.dk/> <http://apachegallery.dk/>
Putting the HEST in .COM <http://www.hestdesign.com/>
Re: mod_proxy_add_forward.c
Posted by Jie Gao <J....@isu.usyd.edu.au>.
On Sat, 20 Jul 2002, Ask Bjoern Hansen wrote:
> As you may know then the proxy module in httpd 2.0 incorporates the
> X-Forwarded-For, X-Forwarded-Host and X-Forwarded-Server
> functionality of mod_proxy_add_forward.c.
What are the differences between them?
I have:
ProxyPass /my-bin/ http://127.0.0.1:8081/my-bin/
ProxyPassReverse /my-bin/ http://127.0.0.1:8081/my-bin/
and I still see
127.0.0.1 - - [22/Jul/2002:08:32:53 +1000] "GET /my-bin ....
in the log file of Apache 1.3.26.
Regards,
Jie
> I just noticed that Thomas Eibner got the proxy people to put it
> into apache 1.3 too since 1.3.25. Yay. :-)
>
> mod_proxy even seems to figure it out on it's own when it's doing a
> "reverse proxy" request.
>
>
> - ask (working on his performance tuning talk for oscon)
>
> --
> ask bjoern hansen, http://askbjoernhansen.com/ !try; do();
>
>