專業室內裝潢設計、舊屋翻新
融合美感與實用,全面營造溫馨好宅!
門窗工程全省維修各大品牌冷氣,不冷、不開機、異聲自關機
冷氣機維修、安裝、保養,歡迎來電洽談皆可洽詢

首頁  •  j2h 論壇 • 程式設計討論     • 

[教學]Apache 加入 mod_gzip 網頁壓縮模組

房東:大學生
發表時間:2006-07-01


測試環境:win2000+AppServ 2.4.0

下載mod_gzip模組
http://www.gknw.net/development/apache/apache-1.3/win32/modules/mod_gzip-1.3.19.2a-w32.zip
解壓縮後放到這裡 c:/AppServ/apache/

修改httpd.conf
# 加入php4,gzip模組
LoadModule php4_module c:/AppServ/php/sapi/php4apache.dll
LoadModule gzip_module c:/AppServ/apache/ApacheModuleGzip.dll

### 以下為gzip模組設置
mod_gzip_on Yes
mod_gzip_minimum_file_size 300
mod_gzip_maximum_file_size 0
mod_gzip_maximum_inmem_size 100000
mod_gzip_keep_workfiles No
mod_gzip_dechunk Yes
mod_gzip_can_negotiate Yes
# 必須在apache目錄下面有一個temp目錄,沒有就新建一個
mod_gzip_temp_dir c:/AppServ/apache/tmp
mod_gzip_item_include file \.html$
mod_gzip_item_include file \.htm$
mod_gzip_item_include file \.shtml$
mod_gzip_item_include file \.shtm$
mod_gzip_item_include file \.pl$
mod_gzip_item_include file \.cgi$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include handler ^perl-script$
mod_gzip_item_include mime ^httpd/unix-directory$
mod_gzip_item_include handler ^server-status$
mod_gzip_item_include handler ^server-info$
mod_gzip_item_include mime ^application/x-httpd-php
mod_gzip_item_include file \.php$
mod_gzip_item_include file \.php3$
mod_gzip_item_include file \.mht$
mod_gzip_item_exclude file \.css$
mod_gzip_item_exclude file \.js$
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude reqheader Content-Type:multipart/form-data
mod_gzip_item_exclude reqheader Content-Type:application/x-www-form-urlencoded
##這個是VBB必須
mod_gzip_item_exclude file \attachment.php$

### End of mod_gzip sample config 記錄gzip運行情況
LogFormat "%h %l %u %t \"%r\" %>s %b mod_gzip: %{mod_gzip_result}n In:%{mod_gzip_input_size}n Out:%{mod_gzip_output_size}n:%{mod_gzip_compression_ratio}npct." mod_gzip_info




  • 贊助網站       

    廣利不動產-新板特區指名度最高、值得您信賴的好房仲
    您的托付,廣利用心為您服務
    廣利不動產-板橋在地生根最實在--新板特區指名度最高、值得您信賴的好房仲
    完整房訊,房屋、店面熱門精選物件,廣利不動產 優質仲介,房屋租賃、買賣資訊透明,交易真安心!



  •  共 0 人回應

    姓名:
    佈告內容:
    其他選項: