nginx缓存
来源:互联网 发布:mac 日历 广告 编辑:程序博客网 时间:2024/05/01 08:34
1
2
3
4
5
location ~* ^.+\.(js|ico|gif|jpg|jpeg|png|html|htm)$ {
log_not_found off;
access_log off;
expires 7d;
}
1
2
3
4
5
6
7
8
9
10
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|html|htm|css)$ {
log_not_found off;
expires 7d ;
access_log off;
proxy_store on;
proxy_store_access user:rw group:rw all:rw;
if
( !-e $request_filename) {
proxy_pass http:
//img
.example.com
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
http {
,,,,,
proxy_cache_path
/var/cache/nginx/cache
levels=1:2 keys_zone=imgcache:100m inactive=1d max_size=10g;
server {
........
location ~* ^.+\.(js|ico|gif|jpg|jpeg|png|html|htm)$ {
log_not_found off;
access_log off;
expires 7d;
proxy_pass http:
//img
.example.com ;
proxy_cache imgcache;
proxy_cache_valid 200 302 1d;
proxy_cache_valid 404 10m;
proxy_cache_valid any 1h;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
}
}
}
0 0
- nginx缓存
- Nginx缓存
- Nginx:设置Nginx作为缓存
- nginx 缓存服务器
- nginx 静态文件缓存
- nginx 静态文件缓存
- Nginx 的 proxy_store 缓存
- nginx缓存设置
- nginx 缓存简单配置
- nginx 静态文件缓存
- Nginx缓存服务器配置
- nginx图片缓存
- nginx清除缓存图片
- nginx web缓存配置
- nginx缓存设置
- Nginx 缓存控制
- Nginx缓存实现
- nginx ob_flush缓存
- android数据存储(一)之Shared Preferences及注意事项
- android网络编程——使用Android中的网络连接
- 搜狐一题面试题 链表的排序
- OCP 1Z0 051 149
- 温家宝在河北省兴隆县六道河中学作地理讲座
- nginx缓存
- C++课程设计(图书管理系统)
- android开发Day1
- 从网站细节入手提高易用性
- 枚举
- 【Flume NG用户指南】(1)设置
- Swift+HAporxy+Keepalived对象存储搭建
- u-boot学习(一):u-boot概述
- JavaScript学习笔记