nginx怎么加expire头
来源:互联网 发布:时时彩平刷软件 编辑:程序博客网 时间:2024/04/27 17:48
nginx怎么对网站的图片、js和css添加过期头呢?
在nginx配置文件server配置下,添加如下配置:
server {
location ~* ^.+/.(jpg|jpeg|gif|png|bmp)$ {
access_log /data/logs/image.log;
root '/usr/opt/nginx/html/www1';
expires 30d;
break;
}
location ~* ^.+/.(js|css)?${
access_log /data/logs/jsandcss.log;
root '/usr/opt/nginx/html/www1';
expires 30d;
}
}
keyword:nginx expire
- nginx怎么加expire头
- apache 配置 Expire/Cache-Control 头
- EXPIRE
- expire
- nginx:expires控制页面缓存以及加头
- apache2.2.22中如何添加Expire/Cache-Control 头
- nginx学习10——gzip压缩,expire缓存
- FILE_GET_CONTENTS 加数据头
- S5PV210加文件头
- RecyclerView加头
- 怎么加好友啊
- 怎么加积分?
- 怎么加QQ群
- 头文件怎么写
- Nginx 绑定主机头
- nginx空主机头
- nginx--主机头设置
- NGINX 添加响应头
- 自己写的第一个程序————学生信息管理系统
- 三道题~~
- nginx怎么启动平滑重启关闭
- 在线钢琴音乐微搏
- BGP 路由反射器(RR)和联邦
- nginx怎么加expire头
- 多思考,才能真正的提高!!!
- 图
- 预装载以及JavaScript Image()对象(转载)
- 启用nginx 的gzip压缩功能
- 软件项目实施的十八般武器(连载)
- 随机洗牌算法
- Mpeg4解码流程
- #ifdef _DEBUG_ 预编译用法小结