Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When a user uploads /tmp/stream* files are created during the upload.

How do I can I change the temporary upload directory from:

/tmp

to:

/home/user/tmp

Running:

  • nginx 0.8.53
  • Phusion Passenger 2.2.15 (mod_rails/mod_rack)
  • Debian Lenny
share|improve this question

You might want to look at the Nginx upload module. It lets you ask Nginx to write the file to a folder and then pass a pointer to its location to your backend. Temporary upload path can be set using $upload_tmp_path variable. Read more at http://www.grid.net.ru/nginx/upload.en.html

share|improve this answer

If possible at all, you should definitely use Reza's answer and use the 'upload' module.

However, if you use nginx as a reverse proxy with a backend on a different machine, that module won't necessarily do much for you. To choose where your temporary request bodies (including uploaded files) go, use the client_body_temp_path config option.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.