I've run into a problem with Apache::Compress in dealing with mod_proxyed
content. The author of Apace::Compress suggested that I post the problem
here.

I'm running apache 1.3.14, mod_perl 1.24_01, & Apache::Compress 1.003 on a
RedHat 6.2 linux box.

I get an internal server error when ever I try to request a file ending
with .htm/.html on a proxied server.

Meaning:
www.company.com/local/index.html - OK, contents are compressed
www.company.com/proxy/           - OK, contents are NOT compressed
www.company.com/proxy/index.html - 500 error w/ Apache::Compress
www.company.com/proxy/script.pl  - OK, contents are NOT compressed

Apache::Compress tries to map the URI to the filesystem and ends up with
an undefined filehandle for content residing on the remote server and
returns SERVER_ERROR.

I've modified Apache::Compress to special case proxy requests, but I
can't figure out how to do a redirect to mod_proxy from within
Apache::Compress.

Is this the best way to resolve this issue? I've been reading the eagle
book and I'm guessing I could use a Translation Handler to handle this as
well.

Here are the relevant sections of httpd.conf:
PerlModule Apache::Compress
<FilesMatch "\.(htm|html)$">
        SetHandler      perl-script
        PerlHandler     Apache::Compress
</FilesMatch>

<IfModule mod_proxy.c>
        ProxyRequests   On
        ProxyVia Off
        ProxyPass               /proxy  http://internalserver/
        ProxyPassReverse        /proxy  http://internalserver/
</IfModule>


Reply via email to