# Conf of ngx\_cache\_purge

**URL:** <https://www.ruby-forum.com/t/conf-of-ngx-cache-purge/196342>\
**Category:** NGINX\
**Created:** [October 12, 2010, 2:36am UTC](https://www.ruby-forum.com/t/conf-of-ngx-cache-purge/196342 "2010-10-12T02:36:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![digginchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc8723/32.png) [@digginchina](https://www.ruby-forum.com/u/digginchina)\
**Post date:** [October 12, 2010, 2:36am UTC](https://www.ruby-forum.com/t/conf-of-ngx-cache-purge/196342/1 "2010-10-12T02:36:27Z")

</div>

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](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:

> **[conf of ngx\_cache\_purge](https://forum.nginx.org/read.php?2,139516,139516#msg-139516)**
>
> 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;
