Answer the question
In order to leave comments, you need to log in
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
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;
}
....
}
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;
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
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
What section is client_max_body_size in? (try to point to http/server)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question