Ein
December 18, 2010 11:20PM
Дано 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@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

upload module не могу разобратся

Ein December 18, 2010 11:20PM

Re: upload module не могу разобратся

Valery Kholodkov December 19, 2010 07:08AM

Re: upload module не могу разобратся

Денис Юзвик December 19, 2010 10:00AM

Re: upload module не могу разобратся

Valery Kholodkov December 19, 2010 11:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 286
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