IIS6 0配置GZIP壓縮

2022-09-17 22:51:26 字數 2087 閱讀 4001

環境:windows2003 + iis6

1、在iis - 本地計算機 - 屬性 - 在「允許直接編輯配置資料庫」選項上打勾    #不打勾也可以,但後面修改xml時要關閉iis服務

2、在iis - web服務擴充套件 - 新增乙個新的web服務擴充套件

副檔名:隨意取

gzip檔案位置:c:\windows\system32\inetsrv\gzip.dll

「設定擴充套件狀態為允許」打勾

確定3、在iis - ** - 屬性 - 服務 – http壓縮

「壓縮應用程式檔案」打勾

「壓縮靜態檔案」打勾

臨時目錄:自己定義

臨時目錄的最大容量:自己定義

確定4、重啟iis服務,這時已經配置了基本的http壓縮了

5、想進一步配置的話,編輯檔案:c:\windows\system32\inetsrv\metabase.xml

此檔案會在c:\windows\system32\inetsrv\history自動備份乙份,自己備份也可以

6、我在原來的基礎上,新增了js/css/aspx的壓縮項

<

iiscompressionscheme

location

="/lm/w3svc/filters/compression/deflate"

hccompressiondll

="%windir%\system32\inetsrv\gzip.dll"

hccreateflags

="0"

hcdodynamiccompression

="true"

hcdoondemandcompression

="true"

hcdostaticcompression

="false"

#改為true

hcdynamiccompressionlevel

="0"

#改為10

hcfileextensions

="htm

html

txtjs

css"

hcondemandcomplevel

="10"

hcpriority

="1"

hcscriptfileextensions

="aspx

aspdll

exe"

>

iiscompressionscheme

>

<

iiscompressionscheme

location

="/lm/w3svc/filters/compression/gzip"

hccompressiondll

="%windir%\system32\inetsrv\gzip.dll"

hccreateflags

="1"

hcdodynamiccompression

="true"

hcdoondemandcompression

="true"

hcdostaticcompression

="true"

hcdynamiccompressionlevel

="0"

#改為10

hcfileextensions

="htm

html

txtjs

css"

hcondemandcomplevel

="10"

hcpriority

="1"

hcscriptfileextensions

="aspx

aspdll

exe"

>

iiscompressionscheme

>

配置中的幾個問題

1、臨時目錄的許可權:使用預設目錄的話不用過多擔心

2、臨時目錄大小:最好受限,此目錄會儲存較多小檔案(小站無需擔心啦)

3、確認自己要壓縮的資源型別:我的站點根為aspx轉html,結果設了html壓縮一直不見效,後面加入了aspx的壓縮,測試壓縮成功

在iis6 0上配置Gzip

gzip能夠壓縮檔案的大小,從而在傳輸的過程中減少流量,就比如100k的檔案減少到了20k相當於同樣的檔案以前要占用100k的流量,現在只需要1 5就能夠辦到。同時傳輸的速度也提高了,但是檔案伺服器端壓縮,在客戶端在解壓縮,耗費了cpu,壓縮的最大好處就是降低了網路傳輸的資料量,從而提高客戶端瀏覽器...

IIS 6 0配置資料庫

iis 6.0配置資料庫 written by rickie lee rickieleemail at yahoo.com 在修改iis 6.0 default web site 的屬性設定後,點選或ok 按鈕時,彈出 inheritance overrides 視窗,在 child notes 列...

IIS 6 0安全增強

iis 6.0安全性概覽 全新設計 結構的變化 增強的日誌功能 快速失敗保護 應用程式隔離 最小許可權原則.該元件預設不安裝 不再安裝應用範例 預設只安裝靜態http伺服器 預設情況下處於鎖定狀態.iis重要目錄 賬戶和服務 目錄 c windows system32 inetsrv c inetp...