Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 73557 invoked from network); 24 Jun 2008 10:06:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jun 2008 10:06:23 -0000 Received: (qmail 11635 invoked by uid 500); 24 Jun 2008 10:06:13 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 11609 invoked by uid 500); 24 Jun 2008 10:06:12 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 11598 invoked by uid 99); 24 Jun 2008 10:06:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jun 2008 03:06:12 -0700 X-ASF-Spam-Status: No, hits=2.7 required=10.0 tests=SPF_NEUTRAL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [128.130.2.110] (HELO mr.tuwien.ac.at) (128.130.2.110) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jun 2008 10:05:21 +0000 Received: from l01.iue.tuwien.ac.at (l01.iue.tuwien.ac.at [128.130.68.90]) by mr.tuwien.ac.at (8.13.7/8.13.7) with ESMTP id m5OA4vnl015463 for ; Tue, 24 Jun 2008 12:04:58 +0200 (MEST) Received: from franz.sabanet.at (chello062178141194.4.14.tuwien.teleweb.at [62.178.141.194]) by l01.iue.tuwien.ac.at (Postfix) with ESMTP id BD538BD8C5 for ; Tue, 24 Jun 2008 12:04:57 +0200 (CEST) Received: from zink.localnet (localhost [127.0.0.1]) by franz.sabanet.at (Postfix) with ESMTP id EA8651093BE for ; Tue, 24 Jun 2008 12:04:56 +0200 (CEST) From: Rainer Sabelka To: users@httpd.apache.org Date: Tue, 24 Jun 2008 12:05:03 +0200 User-Agent: KMail/1.9.51 (KDE/4.0.4; ; ) References: <200806231907.56381.sabelka@iue.tuwien.ac.at> <4860A0C7.60204@ice-sa.com> In-Reply-To: <4860A0C7.60204@ice-sa.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200806241205.04134.sabelka@iue.tuwien.ac.at> X-Virus-Scanned: by amavisd-new X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Use Apache for compression offloading On Tuesday 24 June 2008 09:22:47 Andr=E9 Warnier wrote: > Hi. > > I'm not a specialist of that kind of thing, but I'm curious and I just > wonder about the following kind of scenario : > > - In the proxy server, unset the Accept-encoding header, but set another > non-standard one (or an environment value) that will not be recognised > by the back-end server > - condition the SetOutputFilter DEFLATE by this other header/value > - do the proxying. Hm. I think the check for the Accept-encoding header is hard-coded in=20 mod_deflate. No matter if I SetOutputFilter DEFLATE conditionally or=20 unconditionally, the filter won't compress the output as soon as I unset th= e=20 Accept-encoding header. > The back-end server will not get the Accept-encoding > header. Instead it will get the new header you set, but will not react > to it, so not do compression. > - but the front-end server still will > I think that mod_sentenvif and/or mod_rewrite should allow you to do the > above. Someone else would have to give you the specifics though. > > Andr=E9 > > Rainer Sabelka wrote: > > Hi, > > > > I try to use apache (version 2.2.8 on Ubuntu 8.04) for compression > > offloading. What I want to do: > > - use mod_proxy to forward all requests to the application server > > - use mod_deflate to compress the output > > - remove the "Accept-Encondig:" header from the client's request before > > sending it to the application server to avoid that the compression is > > done there. > > > > My frist approach didn't work: > > > > > > ServerName www.example.com > > > > Order deny,allow > > Allow from all > > > > ProxyRequests Off > > ProxyPass / http://realserver:80/ > > ProxyPreserveHost on > > RequestHeader unset Accept-Encoding > > SetOutputFilter DEFLATE > > > > > > The problem with this approach: when I use "RequestHeader unset Accept- > > Encoding" then the application server gives me uncompressed output (goo= d) > > but also mod_deflate won't comress the output (bad). > > > > So, this is my second approch, which actually works, but I think is a b= it > > an over-kill: > > > > > > ServerName www.example.com > > > > Order deny,allow > > Allow from all > > > > ProxyRequests Off > > ProxyPass / http://localhost:8000/ > > ProxyPreserveHost on > > RequestHeader unset Accept-Encoding > > SetOutputFilter DEFLATE > > > > > > > > ServerName www.example.com > > > > Order deny,allow > > Allow from all > > > > ProxyRequests Off > > ProxyPass / http://realserver:80/ > > ProxyPreserveHost on > > RequestHeader unset Accept-Encoding > > > > > > Here I have 2 instances of apache in proxy-mode connected in series. The > > first one forwards the request to the second one and does the compressi= on > > of the output. The second instance just removes the Accept-Encoding > > header before it forwards the request to the application server. > > > > But I think there must be a an easier solution. Has any body an idea how > > to get this working with only a single instance of apache? > > > > Thanks, > > -Rainer > > > > --------------------------------------------------------------------- > > The official User-To-User support forum of the Apache HTTP Server > > Project. See 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 > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project. > See 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 --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See 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