Forum Moderators: phranque
I'm trying to get mod_gip enabled on my site. My host says that it is installed, but when I try to call it via .htaccess or httpd.conf, nothing happens.
I've tried running it through a verifier and it says "gzip is not enabled on this page"...So, how can I get it enabled?
I'm using the following code
---
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_can_negotiate Yes
mod_gzip_static_suffix .gz
AddEncoding gzip .gz
mod_gzip_update_static No
mod_gzip_command_version '/mod_gzip_status'
mod_gzip_keep_workfiles No
mod_gzip_minimum_file_size 500
mod_gzip_maximum_file_size 500000
mod_gzip_maximum_inmem_size 60000
mod_gzip_min_http 1000
mod_gzip_handle_methods GET POST
mod_gzip_item_exclude reqheader "User-agent: Mozilla/4.0[678]"
mod_gzip_item_exclude mime ^image/
mod_gzip_item_exclude file \.js$
mod_gzip_item_exclude file \.css$
mod_gzip_item_include file \.html$
mod_gzip_item_include file \.php$
mod_gzip_item_include file \.pl$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/html$
mod_gzip_item_include mime ^text/plain$
mod_gzip_item_include mime ^httpd/unix-directory$
mod_gzip_dechunk Yes
mod_gzip_add_header_count Yes
mod_gzip_send_vary On
</IfModule>
---
And have tried it in a .htaccess and an httpd.conf, to no avail.
Any help is appreciated!
- If mod_gzip is listed then it may be a problem the code you've listed above. Try using the simplest example in the docs, restart apache, and see if it works with that.
- If mod_gzip isn't listed, make sure your httpd.conf file contains the following 2 lines in the appropriate places (should be obvious where they go if you have other modules installed):
LoadModule gzip_module /usr/lib/apache/mod_gzip.so
AddModule mod_gzip.c
Then login to Root and restart apache by typing in:
/etc/rc.d/init.d/httpd restart