atom feed10 messages in ru.sysoev.nginxRe: Upload module can not upload file...
FromSent OnAttachments
Yanxin Z.Mar 28, 2011 1:08 pm 
Vitaly TskhovrebovMar 28, 2011 1:11 pm 
Yanxin Z.Mar 28, 2011 1:24 pm 
Vitaly TskhovrebovMar 28, 2011 1:26 pm 
Yanxin Z.Mar 28, 2011 1:32 pm 
Vitaly TskhovrebovMar 28, 2011 1:40 pm 
Yanxin Z.Mar 28, 2011 2:43 pm 
Yanxin Z.Mar 28, 2011 5:51 pm 
Vitaly TskhovrebovMar 29, 2011 12:02 am 
Yanxin Z.Mar 29, 2011 9:10 am 
Subject:Re: Upload module can not upload file (Permission denied)
From:Yanxin Z. (lis@ruby-forum.com)
Date:Mar 28, 2011 1:24:52 pm
List:ru.sysoev.nginx

Thank you for your help.

I changed chmod 777 for /tmp. The access issue is solved. However, I encountered another problem.

82 2011/03/28 13:19:11 [notice] 17231#0: start worker process 17232 83 2011/03/28 13:19:20 [error] 17232#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "POST /upload HTTP/1.1", upstream: "http://127.0.0.1:8080/ upload", host: "127.0.0.1", referrer: "http://127.0.0.1/"

My configure file is here: 1 worker_processes 1; 2 3 error_log logs/error.log notice; 4 5 working_directory /opt/nginx; 6 7 events { 8 worker_connections 1024; 9 } 10 11 http { 12 include mime.types; 13 default_type application/octet-stream; 14

15 server { 16 listen 80; 17 client_max_body_size 100m; 18 19 location / { 20 root html; 21 index index.html; 22 } 23 24 # Upload form should be submitted to this location 25 location /upload { 26 # Pass altered request body to this location 27 upload_pass @test; 28 29 # Store files to this directory 30 # The directory is hashed, subdirectories 0 1 2 3 4 5 6 7 8 9 should exist 31 upload_store /tmp; 32 33 # Allow uploaded files to be read only by user 34 upload_store_access user:rw group:rw all:rw; 35 36 # Set specified fields in request body 37 upload_set_form_field "${upload_field_name}_name" $upload_file_name; 38 upload_set_form_field "${upload_field_name}_content_type" $upload_content_type; 39 upload_set_form_field "${upload_field_name}_path" $upload_tmp_path; 40 41 # Inform backend about hash and size of a file 42 upload_aggregate_form_field "${upload_field_name}_md5" $upload_file_md5; 43 upload_aggregate_form_field "${upload_field_name}_size" $upload_file_size; 44 45 upload_pass_form_field "^submit$|^description$"; 46 upload_cleanup 400 404 499 500-505; 47 } 48 49 # Pass altered request body to a backend 50 location @test { 51 #passenger_enabled on; 52 proxy_pass http://localhost:8080; 53 proxy_temp_path /home/virus/tmp/proxy_temp; 54 } 55 } 56 }