Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
upload module не могу разобратся
- To: nginx-ru@xxxxxxxxx
- Subject: upload module не могу разобратся
- From: Ein <einomrah@xxxxxxxxx>
- Date: Sun, 19 Dec 2010 11:18:25 +0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=yDpb4f+6fk95fiXS88pPqQTWcUDONKeHSWCqyiEsj+I=; b=lZbVOSZ2cIupTH7JN3PJh9cy6YGrv6xWMmDcqZBImFC4ub/NDYQHPuTkxjVmm+KW3s Ixwg38LbHHDObARhudEC981pwHS/k1T+0IWnWoPj9R93qbXspViMNiJoJSPnx+vxVq+S YFGoCD1eqH72Qz5e/hioJtgslv4mbgiuG8+5Q=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; b=pE1WzfxSm+COOT2blaH6LZe1npVeVeUORFTg01UfcaDTqFdqpoyU5R9rLw4qpJhrov EZCLNbQWGgQXAJ4QrpPUZCzmNVZSCPMCsiP6rJcPeMjFS4mCwecHugsTpfQXalB1lPME ah2d9OtWBW/aa1n1qQGxXErgVMgMtyuFbMomI=
Дано nginx 0.8.54 + nginx-upload-module 2.20
На сервере отсутсвует apach
Не могу разобратся, почему не работает загрузка файлов на сервер и как
надо подправить конфиг, что бы заработало.
В данный момент после загрузки, на сервере появляется файл 0000002,
происходит aborted и редирект на
http://convert-test.univertv.ru/upload и пишет 502 Bad Gateway.
Все примеры брал с https://github.com/vkholodkov/nginx-upload-module/blob/2.2/
конфиг:
server {
listen 95.211.21.179:80;
server_name convert-test.univertv.ru;
client_max_body_size 100m;
location / {
root /www/convert-test.univertv.ru;
index index.php index.html index.htm;
}
location ~ "\.(jpg|gif|png|css|js|flv)$"
{
root /www/convert.univertv.ru;
}
location ~ \.php$ {
root /www/convert-test.univertv.ru;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
/www/convert-test.univertv.ru$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location ~ \.pl$ {
root /www/convert-test.univertv.ru;
gzip off;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:8999;
fastcgi_index index.pl;
fastcgi_param SCRIPT_FILENAME
/www/convert-test.univertv.ru$fastcgi_script_name;
}
location ~ ^/cgi-bin/.*\.cgi$ {
fastcgi_pass 127.0.0.1:8999;
fastcgi_index index.cgi;
fastcgi_param SCRIPT_FILENAME
/www/convert-test.univertv.ru$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
}
# Upload form should be submitted to this location
location /upload {
# Pass altered request body to this location
upload_pass /test;
# Store files to this directory
# The directory is hashed, subdirectories 0 1 2 3 4 5 6 7
8 9 should exist
upload_store /media/video/test-convert/uploads;
# Allow uploaded files to be read only by user
upload_store_access user:r;
# Set specified fields in request body
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$";
}
# Pass altered request body to a backend
location /test {
proxy_pass http://localhost:8080;
}
}
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|