2011-01-12 1 views
2

Google Page Speed와 YSlow는 압축 기능을 사용할 수 없다고 말합니다.Apache2 mod_deflate가 작동하지 않습니다.

NameVirtualHost *:80 
<VirtualHost *:80> 
     ServerName episodecalendar.com 
     ServerAlias www.episodecalendar.com 

     DocumentRoot /var/www/episodecalendar.com/production/current/public/ 
     <Directory /var/www/episodecalendar.com/production/current/public> 
       Options Indexes FollowSymLinks MultiViews 
       AllowOverride None 
       Order allow,deny 
       allow from all 
     </Directory> 

     ErrorLog /var/www/episodecalendar.com/production/current/error.log 

     # Possible values include: debug, info, notice, warn, error, crit, 
     # alert, emerg. 
     LogLevel warn 

     CustomLog /var/www/episodecalendar.com/production/current/access.log combined 
     ServerSignature On 

     #Gzip/deflate 
     AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css application/x-javascript 
     BrowserMatch ^Mozilla/4 gzip-only-text/html 
     BrowserMatch ^Mozilla/4\.0[678] no-gzip 
     BrowserMatch \bMSIE !no-gzip !gzip-only-text/html 

     DeflateFilterNote Input instream 
     DeflateFilterNote Output outstream 
     DeflateFilterNote Ratio ratio 

     LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate 
     CustomLog /var/log/apache2/deflate_log deflate 
</VirtualHost> 

내가 뭔가를 놓친 적이 :

여기 내 설정입니까?

mod_deflate를 활성화하고, 헤더 말한다 IS :

Accept-Encoding gzip,deflate 

실제 로그는 다음과 같다 :

"GET /stylesheets/application_packaged.css?1292696861 HTTP/1.1" 6927/31722 (21%) 
"GET /stylesheets/print.css?1292696853 HTTP/1.1" 323/625 (51%) 
"GET /javascripts/application_packaged.js?1292696861 HTTP/1.1" 25146/74582 (33%) 

PS한다. 나는 mod-Passenger로 레일을 달린다.

+0

'Accept-Encoding'은 클라이언트 헤더입니다. –

+2

Page Speed와 YSlow를 사용하여 http://www.episodecalendar.com/을 테스트하면 압축이 활성화되었음을 알립니다. 'GET /stylesheets/print.css?1292696853 HTTP/1.1','Host : www.episodecalendar.com'은'HTTP/1.1 200 OK','Content-Encoding : gzip'을 나타냅니다. – thirtydot

답변

1

죄송합니다. 나는 사무실에서 프록시 서버를 사용하고 있기 때문에 컴퓨터가 작동 할 때까지 요청이 이미 풀린 상태입니다.