mod_gzipÊÇÒ»¸ö¿ÉÒÔ¼ÓËÙhtmlÒ³ÃæµÄ³ÌÐò£¬ÒÔapacheµÄÄ£¿é·½Ê½¹¤×÷£¬Äã¿ÉÒÔÔÚhttp://www.remotecommunications.comµÃµ½
È·¶¨ÄãµÄapache¿ÉÒÔʹÓÃDSO·½Ê½°²×°Ä£¿é¡£
Ê×ÏȽâѹËõ²¢°Ñ²¹¶¡¸´ÖƵ½ÁÙʱĿ¼ÖÐ
# tar zxvf mod*z -C /tmp
# cp *tch /tmp
ÏÈ´ò²¹¶¡
# cd /tmp/mod*a
# patch <../mod_gzip_debug.patch
È»ºó¾Í¿ÉÒÔ±àÒëÁË
# make APXS=/path/to/apxs
°²×°£º
# make install APXS=/path/to/apxs
ÐÞ¸ÄapacheµÄÅäÖÃÎļþ¡£
# cd /path/to/apache/conf
# cp httpd.conf httpd.conf.bak
ÓÃÄãϲ»¶µÄÎı¾±à¼³ÌÐò£¬ÐÞ¸Ähttpd.conf
Òª°ÑÏÂÃæÁ½ÐÐÈ¥µô×¢ÊÍ
LoadModule gzip_module libexec/mod_gzip.so
AddModule mod_gzip.c
È»ºóÔÚ½áβÌí¼ÓÈçÏÂÅäÖãº
# MOD_GZIP configuration
mod_gzip_on Yes
mod_gzip_minimum_file_size 1002
mod_gzip_maximum_file_size 0
mod_gzip_maximum_inmem_size 60000
mod_gzip_item_include mime "application/x-httpd-php"
mod_gzip_item_include mime text/*
mod_gzip_item_include mime "httpd/unix-directory"
mod_gzip_dechunk Yes
mod_gzip_temp_dir "/tmp"
mod_gzip_keep_workfiles No
mod_gzip_item_include file ".php3$"
mod_gzip_item_include file ".php$"
mod_gzip_item_include file ".txt$"
mod_gzip_item_include file ".html$"
mod_gzip_item_include file ".shtml$"
mod_gzip_item_exclude file ".css$"
mod_gzip_item_exclude file ".js$"
#¸ü¶àÏëÓÃgzipѹËõµÄÎļþ¸ñʽ....
È»ºó¾Í¿ÉÒÔÆô¶¯ÁË£º
# /path/to/apache/bin/apachectl restart
Èç¹û·¢ÏÖÓдíÎ󣬸ù¾ÝÌáÊ¾ÖØÐÂÐÞ¸Ähttpd.conf¡£

