Php 如何检查apache是否正在使用;压缩“;及;“遥远的未来”;有效期?

Php 如何检查apache是否正在使用;压缩“;及;“遥远的未来”;有效期?,php,apache,apache2,compression,deflate,Php,Apache,Apache2,Compression,Deflate,我如何检查并查看我的web服务器是否提供了带有压缩和远未来过期标题的内容?YSlow仍然告诉我,尽管我已将以下项目添加到.htaccess文件中,但我有一些资源是以纯文本发送的,并且没有“far future”expires头: <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/plain text/xml BrowserMatch ^Mozilla/4 gzip-only-te

我如何检查并查看我的web服务器是否提供了带有压缩和远未来过期标题的内容?YSlow仍然告诉我,尽管我已将以下项目添加到
.htaccess
文件中,但我有一些资源是以纯文本发送的,并且没有“far future”expires头:

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A0
    ExpiresByType image/gif A2592000
    ExpiresByType image/png A2592000
    ExpiresByType image/jpg A2592000
    ExpiresByType image/jpeg A2592000
    ExpiresByType image/ico A2592000
    ExpiresByType image/x-icon A2592000
    ExpiresByType text/css A2592000
    ExpiresByType text/javascript A2592000
</IfModule>
它说需要gzip的一个资源是main index.php文件,它没有发送自己的AFAIK的头。以下是响应标题:

HTTP/1.1 200 OK
Date: Sun, 18 Sep 2011 00:49:33 GMT
Server: Apache
X-Powered-By: PHP/5.3.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=754163feea6fab8a8d6d7f0ef6ed3c29; path=/
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
因为这是一台Apache2服务器,所以我尝试使用
mod_deflate

我做错了什么,我可以检查什么,如何进一步测试


它还告诉我“有17个组件配置错误的ETag”-也不确定这意味着什么。电子标签在标题中,在我看来还可以。

对于mod_deflate,我建议这样做

YSlow通常是相当准确的。您还可以查看Firebug中的响应标题或Chrome开发者工具中的网络选项卡。是的,我就是这样发布上面的标题的。然而,似乎无论我在配置中做了什么更改,它都不会影响YSlow报告。
HTTP/1.1 200 OK
Date: Sun, 18 Sep 2011 00:49:33 GMT
Server: Apache
X-Powered-By: PHP/5.3.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=754163feea6fab8a8d6d7f0ef6ed3c29; path=/
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html