2011-10-25 2 views
0

IBM HTTP Server 버전 7.0에서 gzip 압축을 활성화했습니다. 응답 헤더에서 나는 Vary을 "accept-encoding"으로 볼 수 있습니다. 그러나 gzip으로로드 된 파일의 크기를 gzip과 비교해도 차이가 없습니다. 올바른 방법으로 수행하고 있는지 확실하지 않습니다. 이 내가 httpd.conf 파일IBM IHS 7.0 gzip 압축이 예상대로 작동하지 않습니다.

LoadModule deflate_module modules/mod_deflate.so 
AddOutputFilterByType DEFLATE text/html text/css application/x-javascript 

당신이 좀 도와 주시겠습니까 추가 무엇인가? 당신이 좋아하는 것처럼

답변

2

다음 코드를 시도하고 변경 :

LoadModule deflate_module modules/mod_deflate.so 

DeflateCompressionLevel 9 
DeflateMemLevel 9 
DeflateWindowSize 15 

DeflateFilterNote Input instream 
DeflateFilterNote Output outstream 
DeflateFilterNote Ratio ratio 

LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate 
CustomLog logs/deflate_log deflate 

<Location /> 
    # 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 
</Location> 
관련 문제