T
T
theaqua2011-10-11 17:55:10
Nginx
theaqua, 2011-10-11 17:55:10

Uploading files > 1 Mb; nginx + fastcgi config?

Good evening.
There was (more precisely, it always was) a problem - files larger than 1 Mb are not uploaded to the site.
Naturally, I first got into php.ini , tweaked upload_max_filesize there to 20M, but that didn't help. I got to the nginx config for a specific site, corrected client_max_body_size :

location / {<br/>
 index index.html index.htm index.php;<br/>
 client_max_body_size 20m;<br/>
 }

didn't help either.
Oh yes, it pours into error.log
2011/10/11 14:48:21 [error] 9111#0: *112 client intended to send too large body: 1237560 bytes, client: 178.217.25.22, server: localhost, request: &quot;POST /api.php?do=upload_image&image=2011.10.11_00h51m26s_004.png HTTP/1.1&quot;

Where else to dig?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
izstas, 2011-10-11
@theaqua

Try specifying client_max_body_size not in location, but in server.

J
Jazzist, 2011-10-11
@Jazzist

In the puff conf, correct two parameters
upload_max_filesize - the size of the uploaded file
post_max_size - max. POST data size
Then restart the web server. Should help

D
Dzuba, 2011-10-11
@Dzuba

Check also in php.ini: post_max_size

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question