Gossamer Forum
Home : General : Perl Programming :

mod_gzip

Quote Reply
mod_gzip
I've compiled mod_gzip from source with:

apxs -i -a -c mod_gzip.c

Added the following into httpd.conf:

LoadModule mod_gzip modules/mod_gzip.so

AddModule mod_gzip.c


....then added all the necessary code to activate it.

When I restart apache and go to:

http://leknor.com/...%3A%2F%2Fwiredon.net

....it shows: mod_gzip/1.3.19.1a but also says mod_gzip is off.

Does anyone know why this would happen?
Quote Reply
Re: [RedRum] mod_gzip In reply to
Have you actually enabled gzip in your httpd.conf with 'mod_gzip_on Yes'?

Here's my full mod_gzip bit as an example:

Code:


<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_minimum_file_size 300
mod_gzip_maximum_file_size 0
mod_gzip_maximum_inmem_size 100000

mod_gzip_item_include file \.htm$
mod_gzip_item_include file \.html$
mod_gzip_item_include file \.jsp$
mod_gzip_item_include file \.php$
mod_gzip_item_include file \.pl$
mod_gzip_item_include file \.cgi$
mod_gzip_item_include file \.tpl$

mod_gzip_item_include mime text/.*
mod_gzip_item_include mime ^application/x-httpd-php
mod_gzip_item_include mime httpd/unix-directory

mod_gzip_item_include handler ^perl-script$
mod_gzip_item_include handler ^server-status$
mod_gzip_item_include handler ^server-info$

mod_gzip_item_exclude file \.css$
mod_gzip_item_exclude file \.js$
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude file adcycle\.cgi$

mod_gzip_dechunk yes
mod_gzip_temp_dir /var/tmp
mod_gzip_keep_workfiles No

mod_gzip_can_negotiate yes
</IfModule>

Last edited by:

paulj: Feb 14, 2002, 9:56 AM
Quote Reply
Re: [paulj] mod_gzip In reply to
Yes, sorry that's what I meant when I said:

>>
then added all the necessary code to activate it.
<<
Quote Reply
Re: [RedRum] mod_gzip In reply to
I have heard others complain that leknor doesn't see their pages as compressed, when in fact they are.

Try turning on the gzip logging into the Apache logs. That will tell you if it's working and give the exact amount of compression.
Quote Reply
Re: [paulj] mod_gzip In reply to
I did think wiredon was loading pretty quickly.

I'll go and set up the log. Thanks.

I really should have thought of that...ugh.
Quote Reply
Re: [paulj] mod_gzip In reply to
In the log I get:

216.35.103.79 - - [15/Feb/2002:02:56:38 -0600] "wiredon.net GET /robots.txt HTTP/1.0" 301 305 mod_gzip: - In:- Out:-:-pct.

...but nothing seems to be written when I access sites. (A robot made that entry).
Quote Reply
Re: [paulj] mod_gzip In reply to
Ahhhhh

I know whats going on. Its gzipping for the main server but not the vhosts.

213.106.15.150 - - [15/Feb/2002:03:03:09 -0600] "207.230.62.135 GET / HTTP/1.1" 200 386 mod_gzip: OK In:672 Out:386:43pct.

....hmm I thought putting it in httpd.conf would add gzipping to all sites?
Quote Reply
Re: [RedRum] mod_gzip In reply to
In Reply To:
I know whats going on. Its gzipping for the main server but not the vhosts.
....hmm I thought putting it in httpd.conf would add gzipping to all sites?


I'm pretty sure it should... I hope so, or I've been thinking my sites are gzipped when they're not! Maybe that explains my high bandwidth costs. Crazy

Guess I'd better go turn logging on and check.
Quote Reply
Re: [paulj] mod_gzip In reply to
All I can say is OMG!!!

Turns out the stupid test site was lying to me :)

Im getting 70% compression and http://wiredon.net is loading like shit off a shovel (pardon the expression).

I've just been sitting here clicking around the site....yippeee!
Quote Reply
Re: [RedRum] mod_gzip In reply to
Someone get me a tissue to wipe away the drool...

"/cgi-bin/lsql/admin/mysqlman/mysql.cgi" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" mod_gzip: DECHUNK:OK In:15874 Out:1506:91pct.