亚洲韩日午夜视频,欧美日韩在线精品一区二区三区,韩国超清无码一区二区三区,亚洲国产成人影院播放,久草新在线,在线看片AV色

您好,歡迎來(lái)到思海網(wǎng)絡(luò),我們將竭誠(chéng)為您提供優(yōu)質(zhì)的服務(wù)! 誠(chéng)征網(wǎng)絡(luò)推廣 | 網(wǎng)站備案 | 幫助中心 | 軟件下載 | 購(gòu)買(mǎi)流程 | 付款方式 | 聯(lián)系我們 [ 會(huì)員登錄/注冊(cè) ]
促銷(xiāo)推廣
客服中心
業(yè)務(wù)咨詢(xún)
有事點(diǎn)擊這里…  531199185
有事點(diǎn)擊這里…  61352289
點(diǎn)擊這里給我發(fā)消息  81721488
有事點(diǎn)擊這里…  376585780
有事點(diǎn)擊這里…  872642803
有事點(diǎn)擊這里…  459248018
有事點(diǎn)擊這里…  61352288
有事點(diǎn)擊這里…  380791050
技術(shù)支持
有事點(diǎn)擊這里…  714236853
有事點(diǎn)擊這里…  719304487
有事點(diǎn)擊這里…  1208894568
有事點(diǎn)擊這里…  61352289
在線(xiàn)客服
有事點(diǎn)擊這里…  531199185
有事點(diǎn)擊這里…  61352288
有事點(diǎn)擊這里…  983054746
有事點(diǎn)擊這里…  893984210
當(dāng)前位置:首頁(yè) >> 技術(shù)文章 >> 文章瀏覽
技術(shù)文章

mod_gzip:Apache的HTTP壓縮優(yōu)化

添加時(shí)間:2011-3-1  添加: admin 
HTTP壓縮對(duì)于純文本內(nèi)容可壓縮至原大小的40%一下,從而提供60%以上的數(shù)據(jù)傳輸節(jié)約,雖然WEB服務(wù)器會(huì)因?yàn)閴嚎s導(dǎo)致CPU占用的略微上升,但是可以節(jié)約大量用于傳輸?shù)木W(wǎng)絡(luò)IO。對(duì)于數(shù)據(jù)壓縮帶來(lái)的用戶(hù)瀏覽速度提升(讓頁(yè)面符合8秒定律),這點(diǎn)總體負(fù)載5%-10%上升是非常值得的。畢竟通過(guò)數(shù)據(jù)壓縮會(huì)比通過(guò)不規(guī)范的HTML代碼優(yōu)化要方便得多。

mod_gzip的安裝

修改Makefile中的 apxs路徑:然后make make install

配置:mod_gzip+mod_php
LoadModule gzip_module modules/mod_gzip.so

...
AddModule mod_gzip.c

...
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_minimum_file_size 1000
mod_gzip_maximum_file_size 300000
mod_gzip_item_include file \.htm$
mod_gzip_item_include file \.html$
mod_gzip_item_include file \.php$
mod_gzip_item_include file \.php3$
mod_gzip_item_include mime text/.*
mod_gzip_item_include mime httpd/unix-directory
# mod_gzip的臨時(shí)
工作
目錄: mkdir /tmp/mod_gzip; chmod -R 777 mod_gzip
mod_gzip_temp_dir /tmp/mod_gzip
mod_gzip_dechunk Yes
mod_gzip_keep_workfiles No
</IfModule>

mod_gzip和mod_php的配合:不要讓mod_gzip和mod_php使用同一個(gè)臨時(shí)目錄,php_session存放目錄可以通過(guò) php.ini設(shè)置到session.save_path = /tmp/php_sess

mod_gzip和Resin配合:
從resin的郵件列表上查到的:要讓mod_gzip在mod_caucho后加載,否則mod_gzip不起作用
...othr modules
AddModule mod_so.c
AddModule mod_caucho.c
#notice: mod_gzip must load after mod_caucho
AddModule mod_gzip.c
AddModule mod_expires.c
...

配置:mod_gzip + resin
<IFModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk yes
mod_gzip_keep_workfiles No
mod_gzip_minimum_file_size 3000
mod_gzip_maximum_file_size 300000
mod_gzip_item_include file \.html$
mod_gzip_item_include mime text/.*
mod_gzip_item_include mime httpd/unix-directory
mod_gzip_item_include handler caucho-request
</IFModule>

配置:mod_gzip + mod_proxy 反相代理加速并壓縮 IIS
注意要增加缺省的文件編碼屬性映射。
AddType text/html .
ASP/' target='_blank' class='infotextkey'>asp
AddType text/html .aspx
 

<IFModule mod_gzip.c>

AddType text/html .asp
AddType text/html .aspx
mod_gzip_on Yes
mod_gzip_dechunk yes
mod_gzip_keep_workfiles No
mod_gzip_minimum_file_size 3000
mod_gzip_maximum_file_size 300000
mod_gzip_item_include file \.html$
mod_gzip_item_include file \.asp$
mod_gzip_item_include file \.aspx$
mod_gzip_item_include mime text/.*
mod_gzip_item_include mime httpd/unix-directory
mod_gzip_item_include handler proxy-server
</IFModule>


關(guān)鍵字:mod_gzip Apache HTTP 壓縮 優(yōu)化
分享到:

頂部 】 【 關(guān)閉
版權(quán)所有:佛山思海電腦網(wǎng)絡(luò)有限公司 ©1998-2024 All Rights Reserved.
聯(lián)系電話(huà):(0757)22630313、22633833
中華人民共和國(guó)增值電信業(yè)務(wù)經(jīng)營(yíng)許可證: 粵B1.B2-20030321 備案號(hào):粵B2-20030321-1
網(wǎng)站公安備案編號(hào):44060602000007 交互式欄目專(zhuān)項(xiàng)備案編號(hào):200303DD003  
察察 工商 網(wǎng)安 舉報(bào)有獎(jiǎng)  警警  手機(jī)打開(kāi)網(wǎng)站