ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nginx+upload progress


  • To: nginx-ru@xxxxxxxxx
  • Subject: nginx+upload progress
  • From: "next40" <nginx-forum@xxxxxxxx>
  • Date: Sun, 25 Dec 2011 06:59:48 -0500
  • Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mickey.jlkhosting.com; s=x; h=Date:Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To; bh=88hVPpC89ZN6EdUQUuBslOJ3mTfP5+2nLjVNA3QJCpo=; b=CYa20MQIbifiRKrKqrnUfx/XN/uDIpEXMJ0B2ywj17XSWPH5bsrAdPwBwaaZRJCG5ayNhgIC/zBhC+WFMm86ulVKx4ZZbZ9835Oh21WMsfpQ3UYxgz7IXBS8xfx6iqnH;

Добрый день, помогите пожалуйста
разобраться с настройкой данной
связки......
вопросы:  файл загружает и сохраняет
скрипт(php) или сам nginx?
не пойму как правильно настроить.....
OS Gentoo Linux
nginx/1.0.10(собран с поддержкой upload module и
uploadprogress module)+php5.3(c поддержкой
pecl-uploadprogress)
использую скрипт на ajax для теста, вот
форма:
          <form id="upload" enctype="multipart/form-data" action="/upload"
method="post">
        <input name="file" type="file"/>
        <input type="submit" value="Upload"/>
      </form>

            <div id="uploading">
              <div id="progress" class="bar">
                <div id="progressbar">&nbsp;</div>
              </div>
            </div>
                <div id="percents"></div>

Конфиг nginx:
        server {

                listen *:80 default;
                server_name uploads;    
                access_log /var/log/nginx/localhost.access_log main;
                error_log /var/log/nginx/localhost.error_log info;
                root /var/www/localhost/htdocs;

                charset  windows-1251;
                location ~ \.php$ {

        fastcgi_connect_timeout 90;
        fastcgi_send_timeout 60;
        fastcgi_read_timeout 120;
        fastcgi_buffer_size 128k;
        fastcgi_buffers 4 256k;
        fastcgi_busy_buffers_size 256k;
        fastcgi_temp_file_write_size 256k;
        fastcgi_intercept_errors on;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME 
$document_root$fastcgi_script_name;
            include        fastcgi_params;
   }


        upload_store /tmp 1;
        upload_set_form_field "${upload_field_name}_name"
"$upload_file_name";
        upload_set_form_field "${upload_field_name}_content_type"
"$upload_content_type";
        upload_set_form_field "${upload_field_name}_path"
"$upload_tmp_path";

        upload_pass_form_field "^submit$";
        location = /upload {
            upload_pass   /internal_upload;
            track_uploads proxied 30s;
        }
       location ^~ /progress {
            # report uploads tracked in the 'proxied' zone
            report_uploads proxied;
        }
}
}

Результат:
405 Not Allowed

В логах:
2011/12/25 16:16:49 [error] 28776#0: *59 failed to create output file
"/tmp/0/0000000010" for "FW_TEW-652BRP_V1(1.10b08).zip" (2: No such file
or directory), client: 192.168.91.190, server: uploads, request: "POST
/upload?X-Progress-ID=e23800c2a6644532b847d983f6adfb2d HTTP/1.0", host:
"10.77.88.243", referrer: "http://10.77.88.243/upload.html";
2011/12/25 16:17:05 [info] 28776#0: *61 client closed prematurely
connection while reading client request line, client: 192.168.91.190,
server: uploads

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?21,220460,220460#msg-220460

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.