# Ngx\_cache\_purge not found

**URL:** <https://www.ruby-forum.com/t/ngx-cache-purge-not-found/246345>\
**Category:** NGINX\
**Created:** [October 4, 2013, 1:09pm UTC](https://www.ruby-forum.com/t/ngx-cache-purge-not-found/246345 "2013-10-04T13:09:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [October 4, 2013, 1:09pm UTC](https://www.ruby-forum.com/t/ngx-cache-purge-not-found/246345/1 "2013-10-04T13:09:16Z")

</div>

Hi there,

I tried to use ngx\_cache\_purge with the configuration below  
location ~ /purge(/.\*) {  
allow 127.0.0.1;  
deny all;  
proxy\_cache\_purge one backend$request\_uri;  
}

```
location ~* ^.+\.(css|js)$ {
    proxy_pass http://backend;
    proxy_cache two;
    proxy_cache_key backend$request_uri;
    proxy_cache_valid 200 1h;
    proxy_cache_valid 404 1m;

```

Then when I tried to open by browser with url  
[http://myurl/purge/style.css](http://myurl/purge/style.css), it’s saying Page not Found (404)

Is there any something I’ve missed?

---

<div class="post-metadata">

**Author:** ![Indo\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ce7236/32.png) [@Indo\_P](https://www.ruby-forum.com/u/Indo_P)\
**Post date:** [October 4, 2013, 1:21pm UTC](https://www.ruby-forum.com/t/ngx-cache-purge-not-found/246345/2 "2013-10-04T13:21:32Z")

</div>

On 04/10/13 12:04, Indo P. wrote:

> ```
> allow 127.0.0.1;
> deny all;
> 
> ```

the url will only work if requested from the server itself…

---

<div class="post-metadata">

**Author:** ![Indo\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ce7236/32.png) [@Indo\_P](https://www.ruby-forum.com/u/Indo_P)\
**Post date:** [October 4, 2013, 1:34pm UTC](https://www.ruby-forum.com/t/ngx-cache-purge-not-found/246345/3 "2013-10-04T13:34:24Z")

</div>

I tried to remove it already.

* * *

From: Richard K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Friday, October 4, 2013 6:20 PM  
Subject: Re: ngx\_cache\_purge not found

On 04/10/13 12:04, Indo P. wrote:

```
    allow 127.0.0.1;

```

> ```
> deny all;
> 
> ```

the url will only work if requested from the server itself…
