mod_proxy_html (reverse proxy) functionality for Apache 1
am 16.07.2008 18:06:53 von Jim Brandt
I need to implement the reverse proxy link-fixing behavior provided in
Apache 2 by mod_proxy_html:
http://apache.webthing.com/mod_proxy_html/
but I need it in Apache 1.
Some digging turned up Apache::ReverseProxy, which appears to have a
nice spot in the code to access the response body before sending it back
to the client.
Are there any other solutions for Apache 1 before I start hacking on
this module? I need solutions that run through Apache because I need the
auth provided by an existing Apache module.
Any issues other than dealing with an incorrect Content-length value?
Thanks,
Jim
--
Jim Brandt
Administrative Computing Services
University at Buffalo
Re: mod_proxy_html (reverse proxy) functionality for Apache 1
am 17.07.2008 23:47:20 von Perrin Harkins
On Wed, Jul 16, 2008 at 12:06 PM, Jim Brandt wrote:
> Are there any other solutions for Apache 1 before I start hacking on this
> module?
The Apache::Filter stuff does work, but I don't see any advantage to
using that in this case. You'd still have to do the proxy fetch
yourself.
- Perrin
Re: mod_proxy_html (reverse proxy) functionality for Apache 1
am 18.07.2008 16:01:26 von Jim Brandt
Turns out I was able to munge the pages on the way back using
Apache::ReverseProxy.
I did this by just hacking in my fixes, but I'm thinking this might be a
useful feature to suggest to the author (with a patch, of course).
At first I thought to offer some of the same functionality as
mod_proxy_html (just the URL rewriting part). But I ended up needed to
modify more than just the URLs in the pages coming through. So I thought
why not just accept a subroutine reference and run the data coming back
through whatever code the user provides?
Any comments on that? What would be the best interface to define the
subroutine reference? Any existing modules that accept this sort of
configuration?
Thanks,
Jim
Jim Brandt wrote:
> I need to implement the reverse proxy link-fixing behavior provided in
> Apache 2 by mod_proxy_html:
>
> http://apache.webthing.com/mod_proxy_html/
>
> but I need it in Apache 1.
>
> Some digging turned up Apache::ReverseProxy, which appears to have a
> nice spot in the code to access the response body before sending it back
> to the client.
>
> Are there any other solutions for Apache 1 before I start hacking on
> this module? I need solutions that run through Apache because I need the
> auth provided by an existing Apache module.
>
> Any issues other than dealing with an incorrect Content-length value?
>
> Thanks,
> Jim
>
--
Jim Brandt
Administrative Computing Services
University at Buffalo