请问oneinstac里的apache如何设置页面缓存时间

问答中心分类: OneinStack请问oneinstac里的apache如何设置页面缓存时间
zhengcf asked 8 年 ago
在httpd.conf里面设置了header set cache-control “max-age=3600″好像不起做用,请大神指导下
<IfModule mod_headers.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml text/javascript
<FilesMatch "\.(js|css|html|htm|png|jpg|swf|pdf|shtml|xml|flv|gif|ico|jpeg)$">
header set cache-control “max-age=3600″
RequestHeader edit "If-None-Match" "^(.*)-gzip(.*)$" "$1$2"
Header edit "ETag" "^(.*)-gzip(.*)$" "$1$2"
</FilesMatch>
DeflateCompressionLevel 6
SetOutputFilter DEFLATE
</IfModule>

2 Answers
oneinstack answered 8 年 ago
参考:http://www.linuxidc.com/Linux/2015-10/123980.htm 试试

zhengcf answered 8 年 ago
测试过了现在正常了,谢谢管理员