Konstantin Svist
April 05, 2011 10:02AM
А так даже файл не сохраняет...


On 04/05/2011 04:51 AM, Valery Kholodkov wrote:
> Прошу прощения. Аргумент upload_pass не может быть абсолютным URL. Нужно указать локейшн или именованный локейшн.
>
> ----- Valery Kholodkov<valery+nginxru@grid.net.ru> wrote:
>> Аргумент upload_pass ее может быть абсолютным URL.
>>
>> ----- Konstantin Svist<fry.kun@gmail.com> wrote:
>>> Всё никак не идёт
>>> nginx/0.9.5
>>>
>>> logs attached
>>>
>>>
>>>
>>> On 03/30/2011 03:54 AM, Valery Kholodkov wrote:
>>>> Не обязаельно. Можно просто сделать дамп запроса с помощью nc.
>>>>
>>>> ----- Konstantin Svist<fry.kun@gmail.com> wrote:
>>>>> Пробовал с
>>>>>
>>>>> location @test {
>>>>> proxy_pass http://localhost:8080;
>>>>> }
>>>>>
>>>>>
>>>>> но без сервера на 8080. Там нужна живая страница чтобы начать?
>>>>>
>>>>>
>>>>> On 03/29/2011 12:40 AM, Valery Kholodkov wrote:
>>>>>> Попробуйте без echo.
>>>>>>
>>>>>> Konstantin Svist пишет:
>>>>>>> Что-то не могу заставить upload работать.. Все время получаю "The
>>>>>>> connection was reset"
>>>>>>>
>>>>>>>
>>>>>>> Конфига:
>>>>>>>
>>>>>>> server {
>>>>>>> listen 80;
>>>>>>> location /upload {
>>>>>>> client_max_body_size 100m;
>>>>>>> access_log logs/other/upload.log;
>>>>>>> error_log logs/other/upload_err.log;
>>>>>>>
>>>>>>> upload_pass @test;
>>>>>>> upload_store /tmp/upload 1;
>>>>>>> upload_store_access user:r;
>>>>>>> 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";
>>>>>>>
>>>>>>> # Inform backend about hash and size of a file
>>>>>>> upload_aggregate_form_field "$upload_field_name.md5"
>>>>>>> "$upload_file_md5";
>>>>>>> upload_aggregate_form_field "$upload_field_name.size"
>>>>>>> "$upload_file_size";
>>>>>>> upload_pass_form_field "^submit$|^description$";
>>>>>>> upload_cleanup 400 404 499 500-505;
>>>>>>> }
>>>>>>> location @test {
>>>>>>> default_type text/html;
>>>>>>> echo "OK";
>>>>>>> }
>>>>>>> location /uploadform {
>>>>>>> default_type text/html;
>>>>>>> echo '<html><head><title>Test
>>>>>>> upload</title></head><body><h2>Select files to upload</h2><form
>>>>>>> name="upload" method="POST" enctype="multipart/form-data"
>>>>>>> action="/upload"><input type="file" name="file1"><br><input
>>>>>>> type="file" name="file2"><br><input type="submit" name="submit"
>>>>>>> value="Upload"><input type="hidden" name="test"
>>>>>>> value="value"></form></body></html>';
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>> Лога:
>>>>>>>
>>>>>>> 63.82.5.67 - - [28/Mar/2011:17:30:29 -0700] "POST /upload HTTP/1.1" 0
>>>>>>> 0 "http://testserver/uploadform" "Mozilla/5.0 (X11; Linux i686;
>>>>>>> rv:2.0) Gecko/20100101 Firefox/4.0"
>>>>> _______________________________________________
>>>>> nginx-ru mailing list
>>>>> nginx-ru@nginx.org
>>>>> http://nginx.org/mailman/listinfo/nginx-ru
>> --
>> Regards,
>> Valery Kholodkov
>>
>> _______________________________________________
>> nginx-ru mailing list
>> nginx-ru@nginx.org
>> http://nginx.org/mailman/listinfo/nginx-ru

server {
listen 3480;
error_log logs/other/err.log;
client_max_body_size 100m;
location / {
default_type text/plain;
echo "OK";
}
location /upload {
upload_pass @test;
upload_store /tmp/upload 1;
}
location @test {
proxy_pass http://testserver2:2080;
}
location /uploadform {
default_type text/html;
echo '<html><head><title>Test upload</title></head><body><h2>Select files to upload</h2><form name="upload" method="POST" enctype="multipart/form-data" action="/upload"><input type="file" name="file1"><br><input type="file" name="file2"><br><input type="submit" name="submit" value="Upload"><input type="hidden" name="test" value="value"></form></body></html>';
}
}
2011/04/05 06:47:07 [debug] 30272#0: *3840 accept: 173.228.88.68 fd:89
2011/04/05 06:47:07 [debug] 30272#0: *3840 event timer add: 89: 60000:1302011287437
2011/04/05 06:47:07 [debug] 30272#0: *3840 epoll add event: fd:89 op:1 ev:80000001
2011/04/05 06:47:07 [debug] 30272#0: *3840 post event 00007FFAF483D0B8
2011/04/05 06:47:07 [debug] 30272#0: *3840 delete posted event 00007FFAF483D0B8
2011/04/05 06:47:07 [debug] 30272#0: *3840 malloc: 0000000002BF82A0:1456
2011/04/05 06:47:07 [debug] 30272#0: *3840 posix_memalign: 0000000002DA98E0:256 @16
2011/04/05 06:47:07 [debug] 30272#0: *3840 malloc: 000000000271D6F0:1024
2011/04/05 06:47:07 [debug] 30272#0: *3840 posix_memalign: 0000000002A97630:4096 @16
2011/04/05 06:47:07 [debug] 30272#0: *3840 http process request line
2011/04/05 06:47:07 [debug] 30272#0: *3840 recv: fd:89 1024 of 1024
2011/04/05 06:47:07 [debug] 30272#0: *3840 http request line: "POST /upload HTTP/1.1"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http uri: "/upload"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http args: ""
2011/04/05 06:47:07 [debug] 30272#0: *3840 http exten: ""
2011/04/05 06:47:07 [debug] 30272#0: *3840 http process request header line
2011/04/05 06:47:07 [debug] 30272#0: *3840 posix_memalign: 0000000002B5F940:4096 @16
2011/04/05 06:47:07 [debug] 30272#0: *3840 http header: "Host: testserver:3480"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http header: "User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0) Gecko/20100101 Firefox/4.0"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http header: "Accept-Language: en-us,en;q=0.8,ru;q=0.5,ja;q=0.3"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http header: "Accept-Encoding: gzip, deflate"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http header: "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http header: "Keep-Alive: 115"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http header: "DNT: 1"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http header: "Connection: keep-alive"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http header: "Referer: http://testserver:3480/uploadform"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http header: "Cache-Control: max-age=0"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http header: "Content-Type: multipart/form-data; boundary=---------------------------7294036581261141071391640722"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http header: "Content-Length: 1307"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http header done
2011/04/05 06:47:07 [debug] 30272#0: *3840 event timer del: 89: 1302011287437
2011/04/05 06:47:07 [debug] 30272#0: *3840 generic phase: 0
2011/04/05 06:47:07 [debug] 30272#0: *3840 rewrite phase: 1
2011/04/05 06:47:07 [debug] 30272#0: *3840 rewrite phase: 2
2011/04/05 06:47:07 [debug] 30272#0: *3840 test location: "/"
2011/04/05 06:47:07 [debug] 30272#0: *3840 test location: "upload"
2011/04/05 06:47:07 [debug] 30272#0: *3840 using configuration "/upload"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http cl:1307 max:104857600
2011/04/05 06:47:07 [debug] 30272#0: *3840 rewrite phase: 4
2011/04/05 06:47:07 [debug] 30272#0: *3840 rewrite phase: 5
2011/04/05 06:47:07 [debug] 30272#0: *3840 upload-progress: get_tracking_id
2011/04/05 06:47:07 [debug] 30272#0: *3840 upload-progress: get_tracking_id no header found
2011/04/05 06:47:07 [debug] 30272#0: *3840 upload-progress: get_tracking_id no id found
2011/04/05 06:47:07 [debug] 30272#0: *3840 trackuploads no id found in POST upload req
2011/04/05 06:47:07 [debug] 30272#0: *3840 rewrite phase: 6
2011/04/05 06:47:07 [debug] 30272#0: *3840 session handler: store_shm_zone=0000000000000000, store_index=-1, get_shm_zone=0000000000000000, get_index=-1
2011/04/05 06:47:07 [debug] 30272#0: *3840 rewrite phase: 7
2011/04/05 06:47:07 [debug] 30272#0: *3840 rewrite phase: 8
2011/04/05 06:47:07 [debug] 30272#0: *3840 post rewrite phase: 9
2011/04/05 06:47:07 [debug] 30272#0: *3840 generic phase: 10
2011/04/05 06:47:07 [debug] 30272#0: *3840 generic phase: 11
2011/04/05 06:47:07 [debug] 30272#0: *3840 generic phase: 12
2011/04/05 06:47:07 [debug] 30272#0: *3840 generic phase: 13
2011/04/05 06:47:07 [debug] 30272#0: *3840 access phase: 14
2011/04/05 06:47:07 [debug] 30272#0: *3840 access phase: 15
2011/04/05 06:47:07 [debug] 30272#0: *3840 access phase: 16
2011/04/05 06:47:07 [debug] 30272#0: *3840 limit_access_handler: 0000000000000000, 0
2011/04/05 06:47:07 [debug] 30272#0: *3840 access phase: 17
2011/04/05 06:47:07 [debug] 30272#0: *3840 access phase: 18
2011/04/05 06:47:07 [debug] 30272#0: *3840 access phase: 19
2011/04/05 06:47:07 [debug] 30272#0: *3840 access phase: 20
2011/04/05 06:47:07 [debug] 30272#0: *3840 access phase: 21
2011/04/05 06:47:07 [debug] 30272#0: *3840 post access phase: 22
2011/04/05 06:47:07 [debug] 30272#0: *3840 malloc: 0000000002999220:4096
2011/04/05 06:47:07 [debug] 30272#0: *3840 http client request body preread 448
2011/04/05 06:47:07 [debug] 30272#0: *3840 http read client request body
2011/04/05 06:47:07 [debug] 30272#0: *3840 recv: fd:89 424 of 859
2011/04/05 06:47:07 [debug] 30272#0: *3840 http client request body recv 424
2011/04/05 06:47:07 [debug] 30272#0: *3840 http client request body rest 435
2011/04/05 06:47:07 [debug] 30272#0: *3840 recv: fd:89 -1 of 435
2011/04/05 06:47:07 [debug] 30272#0: *3840 recv() not ready (11: Resource temporarily unavailable)
2011/04/05 06:47:07 [debug] 30272#0: *3840 http client request body recv -2
2011/04/05 06:47:07 [debug] 30272#0: *3840 http client request body rest 435
2011/04/05 06:47:07 [debug] 30272#0: *3840 event timer add: 89: 60000:1302011287451
2011/04/05 06:47:07 [debug] 30272#0: *3840 http finalize request: -4, "/upload?" a:1, c:1
2011/04/05 06:47:07 [debug] 30272#0: *3840 set http keepalive handler
2011/04/05 06:47:07 [debug] 30272#0: *3840 http close request
2011/04/05 06:47:07 [debug] 30272#0: *3840 http log handler
2011/04/05 06:47:07 [debug] 30272#0: *3840 http full request log handler
2011/04/05 06:47:07 [debug] 30272#0: *3840 free: 0000000002999220
2011/04/05 06:47:07 [debug] 30272#0: *3840 free: 0000000002A97630, unused: 0
2011/04/05 06:47:07 [debug] 30272#0: *3840 free: 0000000002B5F940, unused: 1504
2011/04/05 06:47:07 [debug] 30272#0: *3840 event timer del: 89: 1302011287451
2011/04/05 06:47:07 [debug] 30272#0: *3840 event timer add: 89: 65000:1302011292451
2011/04/05 06:47:07 [debug] 30272#0: *3840 free: 0000000002BF82A0
2011/04/05 06:47:07 [debug] 30272#0: *3840 free: 000000000271D6F0
2011/04/05 06:47:07 [debug] 30272#0: *3840 hc free: 0000000000000000 0
2011/04/05 06:47:07 [debug] 30272#0: *3840 hc busy: 0000000000000000 0
2011/04/05 06:47:07 [debug] 30272#0: *3840 tcp_nodelay
2011/04/05 06:47:07 [debug] 30272#0: *3840 post event 00007FFAF483D0B8
2011/04/05 06:47:07 [debug] 30272#0: *3840 delete posted event 00007FFAF483D0B8
2011/04/05 06:47:07 [debug] 30272#0: *3840 http keepalive handler
2011/04/05 06:47:07 [debug] 30272#0: *3840 malloc: 000000000271D6F0:1024
2011/04/05 06:47:07 [debug] 30272#0: *3840 recv: fd:89 435 of 1024
2011/04/05 06:47:07 [debug] 30272#0: *3840 malloc: 0000000002BF82A0:1456
2011/04/05 06:47:07 [debug] 30272#0: *3840 posix_memalign: 0000000002B5F940:4096 @16
2011/04/05 06:47:07 [debug] 30272#0: *3840 http process request line
2011/04/05 06:47:07 [info] 30272#0: *3840 client sent invalid method while reading client request line, client: 173.228.88.68, server: , request: "------------7294036581261141071391640722"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http finalize request: 400, "?" a:1, c:1
2011/04/05 06:47:07 [debug] 30272#0: *3840 event timer del: 89: 1302011292451
2011/04/05 06:47:07 [debug] 30272#0: *3840 http special response: 400, "?"
2011/04/05 06:47:07 [info] 30272#0: *3840 xss skipped: get_enabled disabled or the current method is not GET while reading client request line, client: 173.228.88.68, server: , request: "------------7294036581261141071391640722"
2011/04/05 06:47:07 [debug] 30272#0: *3840 uploadprogress error-tracker error: 302
2011/04/05 06:47:07 [debug] 30272#0: *3840 uploadprogress error-tracker not tracking in this location
2011/04/05 06:47:07 [debug] 30272#0: *3840 xslt filter header
2011/04/05 06:47:07 [debug] 30272#0: *3840 charset: "" > "utf-8"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http output filter "?"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http copy filter: "?"
2011/04/05 06:47:07 [debug] 30272#0: *3840 image filter
2011/04/05 06:47:07 [debug] 30272#0: *3840 xslt filter body
2011/04/05 06:47:07 [debug] 30272#0: *3840 http postpone filter "?" 0000000002B60688
2011/04/05 06:47:07 [debug] 30272#0: *3840 write new buf t:0 f:0 0000000000000000, pos 0000000000766A60, size: 108 file: 0, size: 0
2011/04/05 06:47:07 [debug] 30272#0: *3840 write new buf t:0 f:0 0000000000000000, pos 00000000007667C0, size: 18 file: 0, size: 0
2011/04/05 06:47:07 [debug] 30272#0: *3840 http write filter: l:1 f:0 s:126
2011/04/05 06:47:07 [debug] 30272#0: *3840 http write filter limit 0
2011/04/05 06:47:07 [debug] 30272#0: *3840 writev: 126
2011/04/05 06:47:07 [debug] 30272#0: *3840 http write filter 0000000000000000
2011/04/05 06:47:07 [debug] 30272#0: *3840 http copy filter: 0 "?"
2011/04/05 06:47:07 [debug] 30272#0: *3840 http finalize request: 0, "?" a:1, c:1
2011/04/05 06:47:07 [debug] 30272#0: *3840 http request count:1 blk:0
2011/04/05 06:47:07 [debug] 30272#0: *3840 http close request
2011/04/05 06:47:07 [debug] 30272#0: *3840 http log handler
2011/04/05 06:47:07 [debug] 30272#0: *3840 http full request log handler
2011/04/05 06:47:07 [debug] 30272#0: *3840 free: 0000000002B5F940, unused: 632
2011/04/05 06:47:07 [debug] 30272#0: *3840 close http connection: 89
2011/04/05 06:47:07 [debug] 30272#0: *3840 free: 000000000271D6F0
2011/04/05 06:47:07 [debug] 30272#0: *3840 free: 0000000002BF82A0
2011/04/05 06:47:07 [debug] 30272#0: *3840 free: 0000000002D95ED0, unused: 0
2011/04/05 06:47:07 [debug] 30272#0: *3840 free: 0000000002DA98E0, unused: 112
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

upload module

Anton Gorlov June 28, 2010 09:06AM

Re: upload module

Andrey Zloy June 28, 2010 10:24AM

Re: upload module

paranoidchaos June 29, 2010 03:52AM

Re: upload module

Valery Kholodkov March 30, 2011 06:56AM

Re: upload module

Konstantin Svist April 01, 2011 09:02PM

Re: upload module

Konstantin Svist April 04, 2011 09:26PM

Re: upload module

Valery Kholodkov April 05, 2011 07:32AM

Re: upload module

Valery Kholodkov April 05, 2011 07:52AM

Re: upload module

Konstantin Svist April 05, 2011 10:02AM

Re: upload module

Valery Kholodkov April 05, 2011 01:54PM

Re: upload module

Konstantin Svist April 05, 2011 06:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 156
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready