Forum Moderators: phranque

Message Too Old, No Replies

How to enable mod gzip

via htaccess, or?

         

madmatt69

9:16 pm on Jan 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi everyone,

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!

hakre

9:58 pm on Jan 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



set an environment variable in the <ifmodule ... block in the httpd.conf. then restart apache. if the environment variable is set, you know that mod_gzip is installed. if your website doesn't use it then that way you want it to use, then your configuration is wrong.

Kerrin

10:03 pm on Jan 21, 2004 (gmt 0)

10+ Year Member



Use the tool at [searchengineworld.com...] to check your server headers.
It should list mod_gzip as being installed.

- 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

madmatt69

12:41 am on Jan 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



THanks for that link!

My host insisted they had it installed, but after showing them that they realized they goofed. It's now installed and I'm gzipping away.

Cheers,
Matt