Big file upload through proxy problem

Hey!

I have this interesting issue… I have a setup that looks like this
Nginx <

  • Apache… and when I try to upload files over proxy (nginx) then it
    gives
    me: 413 Request Entity Too Large (by nginx).

Here is my config: worker_processes auto;error_log logs/error.log crit;events { worker - Pastebin.com

Also Apache and PHP both have 200mb upload limit (upload works perfect
there)

It is able to upload tiny files… like max up to 6kb I think… but
everything bigger than that will get instantly that error.

Any ideas what might be wrong?

Thanks!

Posted at Nginx Forum:

Sorry, I forgot to post an example:

curl -v -F [email protected] -T http:/mydomain.com

  • About to connect() to mydomain.com port 80 (#0)
  • Trying 192.168.15.1… connected
  • Connected to mydomain.com (192.168.15.1) port 80 (#0)

POST / HTTP/1.1
User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7
NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Host: mydomain.com
Accept: /
Content-Length: 3337675
Expect: 100-continue
Content-Type: multipart/form-data;
boundary=----------------------------a12017330dd6

< HTTP/1.1 100 Continue
< HTTP/1.1 413 Request Entity Too Large
< Server: nginx 1.7.8
< Date: Tue, 23 Dec 2014 19:14:32 GMT
< Content-Type: text/html
< Content-Length: 204
< Connection: keep-alive
<

413 Request Entity Too Large

413 Request Entity Too Large


nginx 1.7.8 * Connection #0 to host mydomain.com left intact * Closing connection #0

Posted at Nginx Forum:

Hello!

On Tue, Dec 23, 2014 at 02:17:38PM -0500, Guest13778 wrote:

Accept: /
Content-Length: 3337675
Expect: 100-continue
Content-Type: multipart/form-data;
boundary=----------------------------a12017330dd6

< HTTP/1.1 100 Continue
< HTTP/1.1 413 Request Entity Too Large

The “100 Continue” response before the “413 Request Entity Too
Large” suggests that something non-trivial happens in your setup -
normally nginx will just return 413, without useless “100
Continue” before it. This may indicate, for example, that double
proxying happens, and the error about too large body is returned
by second nginx.

Try looking into nginx error log, it should have additional
information (in particular, it will indicate server block where
the error was generated). Note though, that currently in your
config logging level is set to “crit”, i.e., logging is
effectively switched off. You’ll have to set some reasonable
logging level to see what nginx has to say - at least “error” in
this particular case. If still in doubt, a debugging log can be
used to find out low-level details, see
Debugging | NGINX.


Maxim D.
http://nginx.org/