apache配置静态缓存
配置静态缓存:节省带宽,加快访问速度,提高用户体验。
lt;IfModule mod_expires.c>
ExpiresActive o
ExpiresByType image/gif "access plus 1 days"
ExpiresByType image/jpeg "access plus 24 hours"
ExpiresByType image/png "access plus 24 hours"
ExpiresByType image/css "access plus 2 hours"
ExpiresByType application/x-javascript "now plus 2 hours"
ExpiresByType application/x-shockwave-flash "now plus 2 hours"
ExpiresDefault "now plus 0 min"
lt;/IfModule>
以上加入虚拟主机配置文件中,
days 天 hours 时 min 分
- 上一篇:ubuntu中设置vim的默认选项
- 下一篇:Linux-CentOS下安装JDK