You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Serge Knystautas <se...@lokitech.com> on 2005/06/14 17:53:32 UTC
[users@httpd] mod_deflate w/reverse proxy
I'm having trouble using mod_deflate to compress content that is going
through my reverse proxy using apache 2.0.46. All requests go to a
default virtual host, and then I use RewriteConf/RewriteRule [P] to
carve off certain hostnames to reverse proxy to another webserver. We
use this approach for testing, so normally everyone sees the regular set
of files, but before deploying I can setup special hostnames to see a
newer site version.
Configuration looks like this...
UseCanonicalName Off
AddOutputFilterByType DEFLATE text/html text/plain text/xml
<VirtualHost *>
DocumentRoot /foobar
ServerName www.lokitech.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
RewriteEngine On
RewriteCond %{HTTP_HOST} \.lokitech\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^lokitech\.com [NC]
RewriteRule ^/(.*) http://localhost:8082/$1 [P]
ProxyPreserveHost On
</VirtualHost>
Let's say I'm hosting www.lokitech.com and www.prestosports.com on this
server. With this setup, a request for an HTML URL on
www.prestosports.com will get compressed, but a request for an HTML URL
on www.lokitech.com will not get compressed.
I've done extensive google searching and saw there was something about
how mod_deflate and mod_proxy are not compatible, but it wasn't clear if
this is outdated or if there is a workaround.
Beyond instantly telling me how to fix this, I'm mainly hoping for
suggestions to diagnose why the filter would not get applied to the
proxy requests. Thanks in advance.
--
Serge Knystautas
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_deflate w/reverse proxy
Posted by Joshua Slive <js...@gmail.com>.
On 6/14/05, Serge Knystautas <se...@lokitech.com> wrote:
> I'm having trouble using mod_deflate to compress content that is going
> through my reverse proxy using apache 2.0.46.
Quite an old version. If you are using complex stuff like deflate and
proxy, you should be keeping up with more recent versions.
> AddOutputFilterByType DEFLATE text/html text/plain text/xml
See:
http://httpd.apache.org/docs-2.0/mod/core.html#addoutputfilterbytype
where it tells you that this directive does not work with proxies.
You'll need to look at the more complex configuration:
http://httpd.apache.org/docs-2.0/mod/mod_deflate.html#recommended
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_deflate w/reverse proxy
Posted by David Adam <za...@ucc.gu.uwa.edu.au>.
Serge,
On Tue, 14 Jun 2005, Serge Knystautas wrote:
> I'm having trouble using mod_deflate to compress content that is going
> through my reverse proxy using apache 2.0.46. All requests go to a
> default virtual host, and then I use RewriteConf/RewriteRule [P] to
> carve off certain hostnames to reverse proxy to another webserver. We
> use this approach for testing, so normally everyone sees the regular set
> of files, but before deploying I can setup special hostnames to see a
> newer site version.
>
<snip config and examples>
> Beyond instantly telling me how to fix this, I'm mainly hoping for
> suggestions to diagnose why the filter would not get applied to the
> proxy requests. Thanks in advance.
I ran into a similar problem with mod_gzip on 1.3. I found that
the 'mod_gzip_item_include handler proxy-server' configuration directive
fixed this - there might be something similar for mod_deflate.
Cheers,
David Adam
zanchey@ucc.gu.uwa.edu.au
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org