刺身の上にたんぽぽ乗せる日記

プログラミングしたり、自販機の下に落ちてる小銭を集めたりしてます

gzip完了。

原因は設定ミス。
参照したサイトの以下設定が間違えてる。googleでapache2、mod_deflateで上位に来るのになぁ。

SetEnv gzip-only-text/html 1
SetOutputFilter DEFLATE
DeflateCompressionLevel 8
AddOutputFilterByType DEFLATE text/html text/plain text/xml


# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# Don't compress images
SetEnvIfNoCase Request_URI \

\.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary


問題は、

SetEnv gzip-only-text/html 1

AddOutputFilterByType DEFLATE text/html text/plain text/xml

で、前者の設定が後者の設定を無効化している。前者の行を消せばTypeでgzip対象を指定できる。