nginx缓存插件安装
http {
#以上略
##cache##
proxy_connect_timeout 5;
proxy_read_timeout 60;
proxy_send_timeout 5;
proxy_buffer_size 16k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
proxy_temp_path /tmp/temp_cache1; #临时缓存目录
proxy_cache_path /tmp/cache1 levels=1:2 keys_zone=cache_one:200m inactive=30d max_size=5g; #设置缓存存放,不懂的参数自己百度搜索下
##end##
#以下略
....
}
1. 下载安装插件
cd /server/tools wget http://labs.frickle.com/files/ngx_cache_purge-2.3.tar.gz tar zxvf ngx_cache_purge-2.3.tar.gz cd nginx-1.6.3 ./configure --user=nginx --group=nginx --prefix=/usr/local/nginx-1.6.3 --with-http_ssl_module --with-http_stub_status_module --add-module=../ngx_cache_purge-2.3

浙公网安备 33010602011771号