apache开启expires
来源:互联网 发布:linux终端删除~$ 编辑:程序博客网 时间:2024/05/02 04:25
我安装的是apache2.0.64,这个版本的apche默认编译了expires模块,在httpd.conf里有
LoadModule expires_module modules/mod_expires.so
这 一行,但是没有<IfModule mod_expires.c>的相关配置,所以需要在httpd.conf中添加, 添加在LoadModule这一句之后的任何位置都行,下面的配置中将过期时间统一设置为访问时间加12个月,可以自行更改为想要的:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 12 month"
ExpiresByType text/html "access plus 12 months"
ExpiresByType text/css "access plus 12 months"
ExpiresByType image/gif "access plus 12 months"
ExpiresByType image/jpeg "access plus 12 months"
ExpiresByType image/jpg "access plus 12 months"
ExpiresByType image/png "access plus 12 months"
EXpiresByType application/x-shockwave-flash "access plus 12 months"
EXpiresByType application/x-javascript. "access plus 12 months"
ExpiresByType video/x-flv "access plus 12 months"
</IfModule>
转自 http://www.51testing.com/?uid-314542-action-viewspace-itemid-804869
- apache开启expires
- Apache开启deflate(Gzip)和Expires提升网页加载速度
- Apache开启Gzip和Expires提升网页加载速度
- apache中开启Gzip和expires,优化页面访问速度
- Apache开启Gzip和Expires提升网页加载速度
- Apache开启deflate(Gzip)和Expires提升网页加载速度
- Expires
- Apache两个模块mod-expires和mod_deflate的使用
- apache开启统计模块
- apache 开启 rewrite 功能
- 开启Apache支持.htaccess
- Apache开启伪静态
- apache 开启 网页压缩
- apache 开启Rewrite
- 开启 Apache Server Status
- 开启apache重写模块
- apache开启gzip
- apache重写模块开启
- 利用amqplib测试rabbitmq
- 关于XX信息技术有限公司的面试经历
- 最短路变形 POJ 2253 Frogger
- 多线程编程--对pthread_cond_wait()函数的理解
- TextView使用笔记(一)——为TextView添加下划线或者删除线
- apache开启expires
- 第十九天 类加载器
- 光棍的yy之大数加法模板
- 模块""可能与您正在运行的Windows版本不兼容。检查该模块是否与regsvr32.exe的x86或x64版
- Android之Intent详解
- centos打开Android Studio后出现的错误:adb: error while loading shared libraries: libncurses.so.
- opengl学习及问题总结
- eXtremeComponents 使用总结
- 感悟