Nginx服务器配置Purge清除缓存的步骤
时间:2015-01-25 20:58 来源:linux.it.net.cn 作者:IT
在编译安装Nginx的时候加上了Purge模块,来清除缓存.
www.firefoxbug.net/index.html ==>> www.firefoxbug.net/purge/index.html就能清除.
但是之前配置过程中出现了404,但是缓存明明是存在的,就是Purge不了.后来更改Purge的配置就OK了
## Cache_proxy Purge
location ~ /purge(/.*) {
allow all;
proxy_cache_purge cache_one $host$1$is_args$args;
#proxy_cache_purge cache_one $host;
error_page 405 =200 /purge$1;
}
(责任编辑:IT)
在编译安装Nginx的时候加上了Purge模块,来清除缓存. www.firefoxbug.net/index.html ==>> www.firefoxbug.net/purge/index.html就能清除. 但是之前配置过程中出现了404,但是缓存明明是存在的,就是Purge不了.后来更改Purge的配置就OK了 ## Cache_proxy Purgelocation ~ /purge(/.*) { allow all; proxy_cache_purge cache_one $host$1$is_args$args; #proxy_cache_purge cache_one $host; error_page 405 =200 /purge$1; } (责任编辑:IT) |