Example of upload_module for PHP fastcgi

Hi All,
I’m new on nginx.

I try to create upload application using PHP.
I already configure ubuntu + nginx + php-fcgi +
nginx_upload_module-2.0.9.

is there any URL for nginx configuration sample of upload application
(in detail)?

I found example.php on


but I don’t know how to configure the nginx, so the example can
successfully run.

I try nginx.conf from the same URL, but I didn’t understand about this:

Pass altered request body to a backend

location /test {
proxy_pass http://localhost:8080;
}

what is a backend?
should I pass to the port of php-fcgi (localhost:9000)?
when i try to pass to php-fcgi I got this error:
[error] 11706#0: *1 recv() failed (104: Connection reset by peer)
while reading response header from upstream, client: a.b.c.d, server:
domain.name, request: “POST /upload HTTP/1.1”, upstream:
http://127.0.0.1:9000/upload

where should I put my program to detect the file, the upload storage,
and so on?

thank you for your help.

Oops,
Sorry All, i already found the answer.
the problem is solve.

I read this archive:
http://article.gmane.org/gmane.comp.web.nginx.english/13269/match=upload_module

then i found that the backend can use “fastcgi_pass” not only
“proxy_pass”.

now I’m using this configuration:
location /upload {
# Pass altered request body to this location
upload_pass @uploadinternal;

   .....
}

location @uploadinternal {
    #proxy_pass   http://localhost:9000;
    fastcgi_pass 127.0.0.1:9000;
    include /usr/local/nginx/conf/fastcgi_params;
    fastcgi_param SCRIPT_FILENAME /home/html/example.php;
}

Oon Arfiandwi wrote:

http://github.com/vkholodkov/nginx-upload-module/tree/master

what is a backend?

A backend is arbitrary entity which handles altered requests from upload
module. That could be (at the moment) a proxied web server, a fastcgi
application or another nginx module.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs