24:Webサーバー間通信内容圧縮(mod_deflate)

Date 2014-5-22 4:57:18 | Topic: Linux (サーバー制作)

ダイジェスト認証に関して、http://blogs.yahoo.co.jp/mazbeer/309776.htmlおもしろい記事を見つけた。一度見てみるといい。
本題に入ろう。mod_deflateはデフォルトで導入されているので、その設定ファイルと作る
# gedit /etc/httpd/conf.d/deflate.conf
<Location />
 # DEFLATEの有効化
AddOutputFilterByType DEFLATE text/html text/plain text/xml

# 送信先ブラウザがNetscape 4.xの場合はtext/htmlのみ圧縮
BrowserMatch ^Mozilla/4 gzip-only-text/html

# 送信先ブラウザがNetscape 4.06-4.08の場合は圧縮しない
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# 送信先ブラウザがMSIEの場合は全て圧縮する
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# プロキシサーバーが圧縮未対応ブラウザへ圧縮ファイルを送信しないようにする
Header append Vary User-Agent env=!dont-vary
</Location>

設定の反映
# service httpd reload


This article comes from 錦稜会 KINRYOKAI
https://www.kinryokai.net

The URL for this story is:
https://www.kinryokai.net/article.php?storyid=229