You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ricardo Basto <ri...@dglnet.com.br> on 2002/06/21 02:47:32 UTC
Apache::LightBackhand
Hi list,
I'd like some feedback on this module I just wrote. It's something like a
reverse proxy, but intended as a gateway from the fully-functional
apache/mod_perl to another webserver, probably behind a firewall in the
corporate network.
The configuration is very simple. The implementation relies on LWP to
recreate the request as identical as possible, and then returning the
response, as identical as possible too, back to the client.
I'm using it as a way of publishing some ASP applications to the internet,
and still the only server visible to the net is a linux box.
I hope you find it useful. Any comments are welcome, as this is my first
(public) Apache:: module.
Regards
Ricardo C A de Basto
Re: Apache::LightBackhand
Posted by Perrin Harkins <pe...@elem.com>.
Ricardo Basto wrote:
> For example, the other modules try to interpret the response code of the
> request before forwarding it back. My module tries the opposite: the
> only case it will fake a response code different from what it got is
> when the LWP request times out. Every 404, 500, 302 etc. will just be
> passed back to the client. This I think is something original to my
> module.
In general, the only reason people would use mod_perl for this kind of
thing is so that they can modify the returned content in some way, or
provide additional access control. Transparent reverse proxying is more
efficiently done with mod_proxy and mod_rewrite. See this, for example:
http://www.engelschall.com/pw/apache/rewriteguide/#ToC27
> And I'm neither sure if that is the best name for my module, but I think
> it's target is much more people googling for "backhand" than for
> "proxy".
Well, mod_backhand is a load-balancer, not a proxy. It uses some
proxying ability to accomplish it's goal, but it's really not about
proxying. You module seems like a proxy module to me.
In addition to the Apache::ReverseProxy, it looks like Apache::ProxyPass
and Apache::ProxyRewrite all do essentially the same thing. Maybe you
could fold your ideas into one of those.
- Perrin
RE: Apache::LightBackhand
Posted by Ricardo Basto <ri...@dglnet.com.br>.
Yes, I actually did look at CPAN and the only module that did something
similar was ReverseProxy, but the primary focus of that module is to act
like a transparent proxy, in a way that na entire host will show up as
another (remote, probably Internet) site.
For example, the other modules try to interpret the response code of the
request before forwarding it back. My module tries the opposite: the
only case it will fake a response code different from what it got is
when the LWP request times out. Every 404, 500, 302 etc. will just be
passed back to the client. This I think is something original to my
module.
And I'm neither sure if that is the best name for my module, but I think
it's target is much more people googling for "backhand" than for
"proxy".
And thanks for looking at it!
Ricardo
> Ricardo Basto wrote
>
> >I'd like some feedback on this module I just wrote. It's
> something like
> >a reverse proxy, but intended as a gateway from the fully-functional
> >apache/mod_perl to another webserver, probably behind a
> firewall in the
> >corporate network.
> >
> >
>
> That sounds just like mod_proxy's reverse mode or several of the
> mod_perl proxy modules on CPAN. Have you looked at those? Also, the
> name is confusing because it doesn't seem much like mod_backhand.
>
> Don't get me wrong, the code looks fine and it's nice of you
> to make it
> public. I wouldn't suggest putting it on CPAN though unless it does
> something that the others don't do.
>
> - Perrin
>
>
Re: Apache::LightBackhand
Posted by Perrin Harkins <pe...@elem.com>.
Ricardo Basto wrote
>I'd like some feedback on this module I just wrote. It's something like a
>reverse proxy, but intended as a gateway from the fully-functional
>apache/mod_perl to another webserver, probably behind a firewall in the
>corporate network.
>
>
That sounds just like mod_proxy's reverse mode or several of the
mod_perl proxy modules on CPAN. Have you looked at those? Also, the
name is confusing because it doesn't seem much like mod_backhand.
Don't get me wrong, the code looks fine and it's nice of you to make it
public. I wouldn't suggest putting it on CPAN though unless it does
something that the others don't do.
- Perrin