Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Cant use upload module #20

Open
sumsun opened this Issue May 26, 2011 · 1 comment

Comments

Projects
None yet
2 participants

sumsun commented May 26, 2011

Hello... i installed nginx/0.8.54 and nginx_upload_module-2.2.0 with nginx-upload-progress-module... i place standart configuration file with

worker_processes 20;

error_log logs/error.log notice;

working_directory /usr/local/nginx;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

server {
    listen       80;
    client_max_body_size 100m;

    # 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 /tmp 1;

        # 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;
    }
}

}

and then i start nginx next command

/etc/init.d/nginx start

and i have a trouble :

Starting nginx: /usr/sbin/nginx: /usr/lib/libxml2.so.2: no version information available (required by /usr/sbin/nginx)
[emerg]: unknown directive "upload_pass" in /etc/nginx/nginx.conf:23
configuration file /etc/nginx/nginx.conf test failed

Please help me...

you should shutdown the nginx, and then start the nginx. you SHOULD NOT restart it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment