NGINX - Reverse proxy - WebUploader

I’ve got a standalone WebApplication under Nginx and everything works fine, except webUpload.

Calling the app directly to its port at, webupload works fine.
Calling the app through Nginx at, the app works fine but the webupload doesn’t works.
Debugging the app at looking for WebFileUploader events I can see the WebFileUploader.UploadProgress is fired untill 100%, but the WebFileUploader.UploadComplete is not fire.

This is my Nginx server configuration:

server {
    listen 443;
    root /var/www/html;
    error_page 502 /error.html;
    location /error.html {
    allow all;

    # Add index.php to the list if you are using PHP
    index index.html index.htm index.nginx-debian.html;

    ssl_certificate           /etc/nginx/certificati/mydomain/certificate.crt;
    ssl_certificate_key       /etc/nginx/certificati/mydomain/certificate.key;
    ssl on;

    location / {
        proxy_set_header  Host $host;
        proxy_set_header  X-Real-IP $remote_addr;
        proxy_set_header  X-Forwarded-Proto https;
        proxy_set_header  X-Forwarded-For $remote_addr;
        proxy_set_header  X-Forwarded-Host $remote_addr;
        gunzip on;   
        gzip on;
        gzip_proxied any;    
        proxy_buffering off;
        proxy_read_timeout 5m;
        proxy_pass_request_headers on;

UploadComplete will only Fire is the files make it all the way to the app, but the progress info comes from the browser.

Have you looked at the nginx logs for errors?

Ops! So simple.
I found into nginx.error.log this:

...client intended to send too large body...

Nginx has a 1Mb as allowed size of the client request body, specified in the “Content-Length” request header field.
So I added

client_max_body_size 512m;

into the nginx.conf file

/etc/init.d/nginx reload

and now everything works fine.

I hope this can help others.

Thanks a lot Greg