conf of ngx_cache_purge

digginchina nginx-forum at nginx.us
Tue Oct 12 04:34:53 MSD 2010


here is my conf:
                fastcgi_cache_path /usr/local/nginx/fastcgi_cache
levels=1:2 keys_zone=DIGG:10m inactive=2m;

                location /
                        {
                                fastcgi_cache DIGG;
                                fastcgi_cache_key
$host$uri$is_args$args;
                                fastcgi_cache_valid 200 302 1h;
                                fastcgi_cache_valid 301 1d;
                                fastcgi_cache_valid any 1m;
                                fastcgi_cache_min_uses 2;
                                fastcgi_cache_use_stale error timeout
invalid_header http_500;
                                fastcgi_pass  unix:/tmp/php-cgi.sock;
                                #fastcgi_pass  127.0.0.1:9000;
                                fastcgi_index index.php;
                                include fcgi.conf;
                        }
                location ~ /purge(/.*)
                        {
                                allow 127.0.0.1;
                                deny all;
                                fastcgi_cache_purge DIGG
$host$1$is_args$args;
                        }
nginx -t don't returns any error.
but when i visit http://mydomain/purge/xxx.jpg, it returns me a 404
page.
i checked the error log and found this:


2010/10/11 05:04:25 [emerg] 8915#0: unknown directive
"fastcgi_cache_purge" in /usr/local/nginx/conf/nginx.conf:27

is there anybody help me? thanks a lot.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,139516,139516#msg-139516




More information about the nginx mailing list