using a variable in client_body_temp_path

Maxim Dounin mdounin at mdounin.ru
Fri Aug 7 00:24:35 MSD 2009


Hello!

On Tue, Aug 04, 2009 at 05:43:13PM +0900, Daniel wrote:

> Hi
> 
> I'm trying to use a variable to set client_body_temp_path but doesn't work.
> the conf I have:
> 
> location ~ "\/dev(.*)\/" {
> root /var/mogdata/;
> dav_methods put delete mkcol copy move;
> dav_access user:rw group:rw all:r;
> autoindex on;
> autoindex_exact_size off;
> set $tmppath dev$1/tmp;
> 
> client_body_temp_path /var/mogdata/$tmppath;
> create_full_put_path on;
> }
> 
> but when the file is uploaded the temporally file is in
> "/var/mogdata/$tmppath" with should be "/var/mogdata/dev2/tmp".
> Is there anyway to do it?.

Directive client_body_temp_path does not support variables. Use 
separate explicitly specified locations instead.

Note that only some directives support variables, and this support 
explicitly documented.  I.e. if you don't see something like "you 
may use variables" in official documentation of a directive - it 
does not support variables.

Maxim Dounin





More information about the nginx mailing list