# Proxy\_store HEAD

**URL:** <https://www.ruby-forum.com/t/proxy-store-head/213746>\
**Category:** NGINX\
**Created:** [November 10, 2011, 3:27pm UTC](https://www.ruby-forum.com/t/proxy-store-head/213746 "2011-11-10T15:27:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [November 10, 2011, 3:27pm UTC](https://www.ruby-forum.com/t/proxy-store-head/213746/1 "2011-11-10T15:27:59Z")

</div>

Hello,  
is there a (simple) way to make ‘proxy\_store on’ store the files also on  
HEAD requests instead of just returning the response from  
upstream?

I understand the reasons behind the current behaviour but I’m trying to  
build some sort of synchronisation between few nginx boxes  
without the need to actually download the files to the client - so far  
the only option seems to use ‘proxy\_ignore\_client\_abort’ make  
a GET request and forcefully abort it (since even ranged 1 byte requests  
don’t store the file on the “proxying” host).

p.s. it seems that wiki is a bit outdated and ‘proxy\_cache\_methods’ is  
deprecated/notexisting at least in 1.1.x tree

rr

---

<div class="post-metadata">

**Author:** ![Reinis\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@Reinis\_R](https://www.ruby-forum.com/u/Reinis_R)\
**Post date:** [November 10, 2011, 4:56pm UTC](https://www.ruby-forum.com/t/proxy-store-head/213746/2 "2011-11-10T16:56:30Z")

</div>

Hello!

On Thu, Nov 10, 2011 at 04:27:14PM +0200, Reinis R. wrote:

> requests don’t store the file on the “proxying” host).  
> You may try

proxy\_method GET;

in a server/location dedicated for synchronization. It will cause  
nginx to use GET requests to upstream (though it won’t sent  
anything to client as long as original request was HEAD one).  
This is basically identical to what proxy\_cache does with HEAD  
requests.

BTW, proxy\_ignore\_client\_abort is meaningless with proxy\_store,  
as proxy\_store activates the same logic unconditionally.

> p.s. it seems that wiki is a bit outdated and  
> ‘proxy\_cache\_methods’ is deprecated/notexisting at least in  
> 1.1.x tree

The “proxy\_cache\_methods” directive exists and not deprecated.  
It’s for proxy\_cache though, not proxy\_store.

Maxim D.

---

<div class="post-metadata">

**Author:** ![Reinis\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@Reinis\_R](https://www.ruby-forum.com/u/Reinis_R)\
**Post date:** [November 10, 2011, 5:20pm UTC](https://www.ruby-forum.com/t/proxy-store-head/213746/3 "2011-11-10T17:20:37Z")

</div>

> You may try  
> proxy\_method GET;

Thx Maxim, works like a charm

> The “proxy\_cache\_methods” directive exists and not deprecated. It’s for  
> proxy\_cache though, not proxy\_store.

My fault, I had my own typical nginx istallation with  
–without-http-cache also quick look at Igors docs  
[Модуль ngx\_http\_proxy\_module](http://nginx.org/ru/docs/http/ngx_http_proxy_module.html) didn’t show  
directive so came to wrong conclusion after experimenting with  
the config and nginx throwing ‘unknown directive’ at startup.

rr
