Gzip壓縮技術(shù)讓網(wǎng)站的速度提升起來(lái)!修改默認(rèn)200K文件上傳限制

2023-05-17    分類: 網(wǎng)站建設(shè)

IIS-》網(wǎng)站屬性-》服務(wù)鉤選-》HTTP壓縮-》確定

IIS-》Web服務(wù)擴(kuò)展-》右鍵 添加一個(gè)新的Web服務(wù)擴(kuò)展-》添加擴(kuò)展名-》HTTP Compression
要求的文件-》添加-》C:WINDOWSsystem32inetsrvgzip.dll-》確定
IIS-》Web服務(wù)擴(kuò)展-》選擇HTTP Compression-》右側(cè)點(diǎn)擊允許
設(shè)置Gzip參數(shù)
需要手工修改C:windowssystem32inetsrv 目錄下的 MetaBase.xml 文件
注意MetaBase.xml對(duì)于IIS的運(yùn)行非常重要,若被破壞輕則IIS不能正常運(yùn)行,重則可導(dǎo)致重裝系統(tǒng),所以修改這個(gè)文件之前一定要做好備份,復(fù)制一個(gè)命名為MetaBase_backup.xml文件備份。
暫停運(yùn)行IIS命令 net stop iisadmin
記事本編輯MetaBase.xml文件,
找到
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/deflate"
HcCompressionDll="%windir%system32inetsrvgzip.dll"
HcCreateFlags="0"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="FALSE"
HcDynamicCompressionLevel="0"
HcFileExtensions="htm
html
txt"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe"
>
</IIsCompressionScheme>
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/gzip"
HcCompressionDll="%windir%system32inetsrvgzip.dll"
HcCreateFlags="1"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="0"
HcFileExtensions="htm
html
txt"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe"
>
</IIsCompressionScheme>
設(shè)置deflate壓縮參數(shù)。
HcDynamicCompressionLevel="0" 更改為 HcDynamicCompressionLevel="1"
設(shè)置gzip壓縮參數(shù)。
HcDynamicCompressionLevel="0" 更改為 HcDynamicCompressionLevel="1"
HcDoStaticCompression="FALSE" 更改為 HcDoStaticCompression="TRUE"
增加靜態(tài)和動(dòng)態(tài)擴(kuò)展名整體修改如下
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/deflate"
HcCompressionDll="%windir%system32inetsrvgzip.dll"
HcCreateFlags="0"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="1"
HcFileExtensions="htm
html
css
swf
xml
txt"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
aspx
php
zip
rar
dll
exe"
>
</IIsCompressionScheme>
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/gzip"
HcCompressionDll="%windir%system32inetsrvgzip.dll"
HcCreateFlags="1"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="1"
HcFileExtensions="htm
html
css
swf
xml
txt"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
aspx
php
zip
rar
dll
exe"
>
</IIsCompressionScheme>
===================================
更改默認(rèn)附件上傳文件大小的限制
修改文件 metabase.xml
AspMaxRequestEntityAllowed="204800"
更改為
AspMaxRequestEntityAllowed="20480000"
即默認(rèn)200k更改為20M
===================================
保存文件
重啟IIS命令 net start w3svc 命令 iisreset
如果不想停止IIS而直接編輯MetaBase.xml文件則這樣操作。
計(jì)算機(jī)管理-》Internet信息服務(wù)(IIS)管理器屬性-》鉤選“允許直接編輯配置數(shù)據(jù)庫(kù)”
這樣就可以,不用停止IIS編輯MetaBase.xml文件
檢測(cè)是否壓縮工具 http://tool.chinaz.com/Gzips/

分享文章:Gzip壓縮技術(shù)讓網(wǎng)站的速度提升起來(lái)!修改默認(rèn)200K文件上傳限制
分享URL:http://www.muchs.cn/news38/259538.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供搜索引擎優(yōu)化、云服務(wù)器、品牌網(wǎng)站設(shè)計(jì)微信公眾號(hào)、標(biāo)簽優(yōu)化網(wǎng)站營(yíng)銷

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

網(wǎng)站優(yōu)化排名