RE: [users@httpd] mod_deflate w/reverse proxy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Take a look at http://issues.apache.org/bugzilla/show_bug.cgi?id=31226. There is apparently a problem with AddOutputFilterByType.

I've had the exact same problem. The solution I chose was to use SetOutputFilter (instead of AddOutputFilterByType) and use other means for selecting what resources to compress or not compress. You can set or remove an outputfilter per directory or location, or you can use mod_rewrite to set the environment variable no-gzip for specific resources. It sure would be a lot nicer to be able to use the MIME type to determine whether to apply compression or not, but...

-ascs

-----Original Message-----
From: Serge Knystautas [mailto:sergek@xxxxxxxxxxxx] 
Sent: Tuesday, June 14, 2005 5:54 PM
To: users@xxxxxxxxxxxxxxxx
Subject: [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@xxxxxxxxxxxx

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux