Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The site in question is goinnativerecords.com

I've got a basic shared hosting account and my website is a little heavy on the javascript so I decided to compress with gzip.

Contacted my hosting, they say that Apache on the server has mod_gzip enabled.

So I added the following to my local .htaccess (don't have access to the global).

<ifModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

Compression doesn't seem to work (I test with http://www.gidnetwork.com/tools/gzip-test.php).

I tried adding php_value output_handler ob_gzhandler To compress through php only, but still no dice. I also tried deflate with no luck..

Might someone hint me about what I'm doing wrong?

share|improve this question
add comment

1 Answer 1

Are you sure the server is actually loading the .htaccess? A quick test I usually do is throw some garbage text in there. If Apache starts producing 500's, you can be sure it's actually being used.

mod_gzip is actually pretty uncommon. Are you sure they weren't talking about mod_deflate? Try enabling that instead: https://httpd.apache.org/docs/2.0/mod/mod_deflate.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.