S
S
Sergey2012-06-07 18:45:28
linux
Sergey, 2012-06-07 18:45:28

Error in nginx, I don't understand what's the problem?

Throws 413 Request Entity Too Large when uploading a file via the web interface.
Directive in configs client_max_body_size 100m I

upload a file of 12 mb, why the error then?

Nginx works as a frontend to apache, perhaps it's important and worth mentioning, but for some reason I'm sure that this is not the problem.

Answer the question

In order to leave comments, you need to log in

8 answer(s)
V
VBart, 2012-06-08
@butteff

Well, we adjusted ourselves:
Your putit.ru:

upstream putit {
    # Address of the back-end'a
    server putit.ru:8080;
}
server {
    listen 80;
    server_name www.putit.ru putit.ru;
    access_log /home/username/domains/putit.ru/logs/nginx_access.log;
    error_log /home/username/domains/putit.ru/logs/nginx_error.log;
    # Redirect to back-end
    location / {
         proxy_pass backend;
         include /etc/nginx/proxy.conf;
    }
    ....
}

Your proxy.conf :
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 16k;
proxy_buffers 16 16k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;

M
mitnlag, 2012-06-08
@mitnlag

Duck enable debug and take a look at error.log. No need for fantasy

Z
zuborg, 2012-06-07
@zuborg

It may well be that Apache generates this error, check post_max_size in php.ini, and error logs of nginx and apache, also compare access logs for your request in nginx and apache

G
gaelpa, 2012-06-07
@gaelpa

Why do you think that the problem is in nginx?
apache has
httpd.apache.org/docs/2.0/mod/core.html#limitrequestbody
httpd.apache.org/docs/2.0/mod/core.html#limitxmlrequestbody
php has (if you use it, if not then see the docks for your backend)
ru2.php.net/manual/en/ini.core.php#ini.upload-max-filesize
ru2.php.net/manual/en/ini.core.php#ini.post-max -size

A
Andrey Burov, 2012-06-07
@BuriK666

What section is client_max_body_size in? (try to point to http/server)

V
vadv, 2012-06-07
@vadv

Is there a place in the tmp dir that is specified in php?

M
Merlyel, 2012-06-07
@Merlyel

And in the debug for the desired virthost tried to run and watch?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question