[Zope] ZServer -> Apache/mod_proxy -> mod_gzip: Possible!!! (How-To now available)
Paul Horbal
horbal@vlsi.enel.ucalgary.ca
Thu, 29 Nov 2001 13:36:57 -0700
Chris, Everyone,
I've put together a fairly detailed How-To describing how to use mod_gzip for Apache to compress Zope documents that are proxied via mod_proxy (ProxyPass). You can find it here:
http://www.zope.org/Members/softsign/
Feedback is welcome!
cheers,
Paul.
On Thu, Nov 29, 2001 at 10:30:18AM -0500, Chris McDonough wrote:
> Hi Paul, this is good stuff. Would you mind turning this into a HowTo
> on Zope.org?
>
> ----- Original Message -----
> From: "Paul Horbal" <horbal@vlsi.enel.ucalgary.ca>
> To: "Oliver Bleutgen" <myzope@gmx.net>
> Cc: <zope@zope.org>
> Sent: Wednesday, November 28, 2001 1:35 PM
> Subject: Re: [Zope] ZServer -> Apache/mod_proxy -> mod_gzip:
> Possible???
>
>
> > Hi everyone...
> >
> > After following Oliver's advice and bumbling through the mod_gzip
> mailing list further, I've gotten mod_gzip to start compressing all
> the Zope stuff served through Apache. Here's a listing of the entries
> in my httpd.conf for anybody else that would like to try it (I highly
> recommend it):
> >
> > # In the main part of httpd.conf
> >
> > mod_gzip_on Yes
> > mod_gzip_can_negotiate Yes
> > mod_gzip_add_header_count Yes
> > mod_gzip_minimum_file_size 400
> > mod_gzip_maximum_file_size 0
> > mod_gzip_temp_dir /tmp
> > mod_gzip_keep_workfiles No
> > mod_gzip_maximum_inmem_size 100000
> > mod_gzip_dechunk Yes
> >
> >
> > mod_gzip_item_include mime ^text/*
> > mod_gzip_item_include mime httpd/unix-directory
> > mod_gzip_item_include file \.htm$
> > mod_gzip_item_include file \.html$
> > mod_gzip_item_include handler proxy-server
> > mod_gzip_item_include handler cgi-script
> >
> > mod_gzip_item_exclude rspheader Content-Type:image/*
> > mod_gzip_item_exclude mime text/css
> > mod_gzip_item_exclude file \.css$
> > mod_gzip_item_exclude file \.js$
> >
> >
> > # Now the VirtualHost for my Zope ZServer
> >
> > <VirtualHost xxx.xxx.xxx.xxx>
> > ServerName www.foo.com
> > ServerAdmin me@foo.com
> >
> > ProxyPass / http://foo:8080/zopedir/
> > ProxyPassReverse / http://foo:8080/zopedir/
> > ProxyPass /misc_ http://foo:8080/misc_
> > ProxyPass /p_ http://foo:8080/p_
> > </VirtualHost>
> >
> >
> > Note the salient features:
> >
> > a) ...include mime ^text/* -- tells mod_gzip to look for any file
> with a mime type of "text" - this includes most stuff served up
> through Zope IIRC
> >
> > b) ...include handler proxy-server -- reminds mod_gzip to try and
> intercept mod_proxy requests too (this is the part I was missing)
> >
> > c) ...exclude rspheader Content-Type:image/* -- tells mod_gzip not
> to bother compressing images (the gain is minimal in most cases and
> actually chokes NS4 browsers)
> >
> >
> >
> > cheers,
> > Paul.
> >
> >
> >
> >
> >
> > On Wed, Nov 28, 2001 at 10:21:17AM +0100, Oliver Bleutgen wrote:
> > > Paul Horbal wrote:
> > >
> > > > Hi everyone,
> > > >
> > > > I've searched high and low but I can't find any documentation
> for
> > > > setting up mod_gzip to work with a Zope server (ZServer) being
> served
> > > > through Apache's mod_proxy with the ProxyPass directives.
> > > >
> > > > Is this possible at the moment? Is there maybe a Zope product
> that
> > > > handles gzipping served pages? This seems like a really good
> idea...
> > > >
> > > > I have mod_gzip working with Apache - other VirtualHosts on the
> same
> > > > machine that aren't proxied serve gzipped pages - but apparently
> > > > mod_proxy and mod_gzip don't like to play in the same sandbox.
> Other
> > > > people have reported success using mod_rewrite instead... Is
> there some
> > > > sort of performance hit you sustain in this case? If not, how
> do you
> > > > set that up? =)
> > >
> > >
> > > HI Paul,
> > >
> > > I use mod_proxy + mod_gzip and it works great - if it weren't for
> the
> > > damn browsers ;-). Seriously, there can be some gotchas, but all
> > > encountered were client side problems.
> > >
> > > I use mod proxy, invoced via a rewrite rule (RewriteRule .... [P])
> > > The only thing which might be special is
> > > mod_gzip_item_include handler proxy-server
> > >
> > > There are some examples on the mod_gzip homepage&mailing lists.
> > >
> > > cheers,
> > > oliver
> > >
> > >
> > > _______________________________________________
> > > Zope maillist - Zope@zope.org
> > > http://lists.zope.org/mailman/listinfo/zope
> > > ** No cross posts or HTML encoding! **
> > > (Related lists -
> > > http://lists.zope.org/mailman/listinfo/zope-announce
> > > http://lists.zope.org/mailman/listinfo/zope-dev )
> >
> > --
> > horbal@atips.ca
> >
> > _______________________________________________
> > Zope maillist - Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > ** No cross posts or HTML encoding! **
> > (Related lists -
> > http://lists.zope.org/mailman/listinfo/zope-announce
> > http://lists.zope.org/mailman/listinfo/zope-dev )
> >
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
--
horbal@atips.ca