[Jax.PM] perl HTTP header insertion proxy

Nate Campi nate at campin.net
Wed May 14 17:15:28 CDT 2003


On Wed, May 14, 2003 at 02:38:29PM -0400, WC -Sx- Jones wrote:
> On Wednesday, May 14, 2003, at 02:19  PM, Nate Campi wrote:
> >I have a need for a proxy that sits between a cache acting as a HTTP
> >accelerator (apache mod_proxy) and a backend SSI apache site that can
> >add the Content-Length header. We already have the Expires header on
> >the origin site and will still be lacking Last-Modified but I think
> >we'll be ok without it.
> 
> On the same server?  Which version of Apache?

Version of apache doesn't matter, I've tried 2.0 with mod_cache and
mod_proxy and 1.3 mod_proxy and neither caches the site properly, since
SSI doesn't send the headers needed to make content cacheable. 2.0 has
directives to cache even without

Wheter or not it's on the same server doesn't really matter either,
though I'd run at least two and load balance them.

> Why won't another mod_proxy instance help?

Because none of the caches add the headers the later caches need if they
are to cache.

> >Does anyone know of such a beast, or something like it? Perhaps there's
> >a module that could be easily adapted.
> >
> >I'd tend to shy away from a full-blown mod_perl instance between the
> >other two layers, too big for a small need. It seems that you could 
> >bust
> >out a simpler standalone perl script that's easier to debug and/or
> >extend later.
> 
> You can set up a reverse mirroring proxy - which is what I am thinking 
> you mean.
> 
> See ProxyPassReverse (to stop the client from by-passing the first 
> proxy) and ProxyRemote (to identify your new proxy to the caching 
> proxy.)

I'm already doing that, but the content is never cached.

> I doubt it is too much different than the caching server configs.  Sort 
> of like a double reverse.  Maybe I am confused =)

It's just that I only gave a very short description. See the mod_perl
list for my description there:
<URL:http://mathforum.org/epigone/modperl/franlulgald>

> If you simply want to insert random headers into your HTTP stream, then 
> see
> 
> http://stein.cshl.org/~lstein/talks/WWW6/sniffer/

Interesting.
-- 
Nate Campi    http://www.campin.net 



More information about the Jacksonville-pm mailing list