是否可以dynamic设置nginx上传模块的upload_store值?

我的服务器上有很多硬盘,我想上传文件。 由于将file upload到一个驱动器然后将其移动到另一个驱动器上,我想直接将file upload到它应该存储的驱动器上的临时文件夹。

location /upload/(.*)$ { upload_store /home/hoster-node/data/$1/tmp/; 

我尝试了这样的想法将文件发布到/upload/sda2或其他东西,然后将临时文件存储在那里。

但是,当尝试启动nginx时,我遇到了这样的失败:

 Restarting nginx: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: [emerg] mkdir() "/home/hoster-node/data/$1/tmp/" failed (2: No such file or directory) nginx: configuration file /etc/nginx/nginx.conf test failed 

如果当然我可以继续创build24个不同的位置指令以及所有其他的东西,每个驱动器一个…

但是我打算在一个很大的系统中做这个,我想用他们的文件系统uuids来组织驱动器,所以这实际上是不切实际的。 只有一个最后的措施措施。 还是比每次将文件从系统驱动器移动到存储驱动器更好…

任何inputappriciated!