Anyone know anything about using mod_deflate gzipping with Rails?

Anyone know anything about using mod_deflate gzipping with Rails? I’ve
got it enabled in our .htaccess but it doesn’t seem to handle gzip
anything going through Rails. Any ideas?

Thanks

On 16 Jul 2008, at 21:26, sev2 wrote:

Anyone know anything about using mod_deflate gzipping with Rails? I’ve
got it enabled in our .htaccess but it doesn’t seem to handle gzip
anything going through Rails. Any ideas?

It should. We’re using it for all our applications. This is the
section that we stick at the end of our vhost configuration (not
on .htaccess, but it really shouldn’t make all too much of a
difference):

Deflate

AddOutputFilterByType DEFLATE text/html text/plain text/xml
application/xml application/xhtml+xml text/javascript text/css
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

If it doesn’t work, you should check your apache logs, there should be
some feedback in there on why the page isn’t deflated.

Best regards

Peter De Berdt

Thanks Peter. This app is on shared hosting so we can’t edit the vhost
conf. I think I’ve managed to get an answer from the hosts (after a
lot of talk). We simply have to move our app dir into our public_html
folder… which should make gzip compression work.

Cheers

Alistair Holt

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs