Nginx之proxy_store模块
来源:互联网 发布:linux 查看磁盘数量 编辑:程序博客网 时间:2024/05/29 12:55
proxy_store模块
作用:直接把静态文件在本地硬盘创建并读取
特点:无法通过程序控制cache何时过期,需要定期删除缓存目录中的内容(不需要删除,永久性保存视频切片文件)
特点:无法通过程序控制cache何时过期,需要定期删除缓存目录中的内容(不需要删除,永久性保存视频切片文件)
基本的配置方式:
proxy_store on; //启用缓存到本地的功能
proxy_store_access user:rw group:rw all:rw;
proxy_temp_path /video //指定缓存到那额目录之下
if ( !-e $request_filename) {
proxy_pass http://ip;//当请求的文件在本地的prox_temp_path指定的目录下不存在时,再向源站请求拉取
}
root模式:
server {
listen 80;
server_name ip;
index index.html index.htm;
root /;
location / {
root /;
proxy_store on;
proxy_store_access user:rw group:rw all:rw;
proxy_temp_path /;
if ( !-e $request_filename) {
proxy_pass http://ip;
}
}
}
alias模式
server
{
listen 80;
server_name ip;
index index.html index.htm;
root /data/video/hls;
location ^~ /jiaoyu/data/video/hls {
alias /data/video/hls;
proxy_store on;
proxy_store_access user:rw group:rw all:rw;
proxy_temp_path /data/video/hls;
if ( !-e $request_filename) {
proxy_pass http://ip;
}
}
}
0 0
- Nginx之proxy_store模块
- Nginx缓存模块proxy_store
- Nginx 的 proxy_store 缓存
- Nginx 的 proxy_store 缓存
- CentOS 5.9 下nginx proxy_store的使用
- lua实现nginx proxy_store的purge缓存清理的方法
- Nginx模块之SessionSticky
- nginx模块之ngx_http_proxy_module
- nginx模块之ngx_http_headers_module
- nginx模块之ngx_http_upstream_module
- Nginx之hander模块
- Nginx之http_image_filter_module模块使用
- nginx之chunked模块解析
- nginx四 之缓存模块
- Nginx实践1 利用proxy_store实现高效的静态文件分布缓存服务器
- 让nginx的proxy_store和proxy_cache支持ctrl+f5和PURGE二种方
- Nginx实践:用proxy_store实现高效的静态文件分布缓存服务器
- NGINX模块开发 之 验证URL参数
- Android 网络连接判断并进行相关处理
- 排队[HNOI2012][Codevs1994]
- crazyfile
- HDU 2546 饭卡 (01背包)
- Ubuntu 双网卡桥接brctl
- Nginx之proxy_store模块
- 从今天开始写技术博客
- C++多态
- Nginx配置文件详细说明
- PADS2007库转换为PADS 9.0以上库文件
- 浅谈 MVP in Android
- 算法 Tricks(二) —— 大数的处理
- 最后一个支持Windows 的Python3
- 低边驱动与高边驱动