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
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.
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 didn’t show
directive so came to wrong conclusion after experimenting with
the config and nginx throwing ‘unknown directive’ at startup.
rr
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.