Forum OpenACS Q&A: Re: Res: Re: Res: Re: Res: Re: How to enable gzip compression

Yes, www.mozilla.org is doing it, for example:

----------------------------------
http://www.mozilla.org/

GET / HTTP/1.1

Host: www.mozilla.org

User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.8.1) Gecko/20061010 Firefox/2.0

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: es-es,es;q=0.8,en-us;q=0.5,en;q=0.3

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

HTTP/1.x 200 OK

Age: 449

Date: Mon, 29 Oct 2007 19:25:01 GMT

Expires: Mon, 29 Oct 2007 19:35:01 GMT

Cache-Control: max-age=600

Connection: Keep-Alive

Via: NS-CACHE-6.1: 1

Etag: "2b5a-cc8b36c0"

Server: Apache/2.0.52 (Red Hat)

Last-Modified: Thu, 25 Oct 2007 20:08:35 GMT

Accept-Ranges: bytes

Content-Type: text/html

Content-Encoding: gzip

Content-Length: 3068

----------------------------------

That's the data from the headers given by the firefox plugin.

Hello Hector,

I would like to ask if you were successful with enabling gzip compression on your server.

I've been playing with nszlib in the past couple of days and like you I have been unable to get aolserver 4.5 to server gzip content.

However, I found that if I remove 0-acs-init.tcl and zz-postload.tcl from openacs/tcl/ aolserver ns_zlib works.

I'm guessing that it must be something in acs-init that is overriding ns_zlib.

I'm trying to trace acs-init now with the hopes of pin pointing exactly what is preventing compressed content and I was wondering if you have had any luck.

Thanks,

Hamilton

Hello Hamilton,

No, I couldn't, but i did a workaround using nginx to serve the pages in top of aolserver, as seen in malte's tutorial.

Now, nginx is doing gzip compression, ssl negotiation and serving static content (css, js, images...).

BTW, aolserver without ssl didn't restart with signal 11 errors anymore.

Greetings, Héctor