413 Upload Error on New Server


#1

Hello,

I’m brand new to Pimcore and I’m trying it out for my company so I setup a new server on Debian 9. So far, everything has been fine except when I try to load anything over 100Mb in size. I’m presented with a error stating “413 Request Entity Too Large” - nginx/1.10.3.

I’ve edited my php.ini file ‘upload_max_filesize’ and ‘post_max_size’ to well above 100M with no changed in the error and my nginx.conf file ‘client_max_body_size’ again, well over 100M and even to 0 which is supposed to get rid of the check but I can’t seem to get past this 413 error.

I know my art team will easily pass 100Mb file sizes so I can’t recommend putting this into production until I get this fixed. Any help would be awesome. Thanks!


#2

This is the error box I am getting


#3

Thats an nginx issue, please check your configuration, here is an example on how to change that:

http {
	include	mime.types;
	default_type	application/octet-stream;
	sendfile	on;
	keepalive_timeout	65;
	server {
		client_max_body_size	20M;
		listen	80;
		server_name	localhost;
		# Main location
		location / {
			proxy_pass	http://127.0.0.1:8000/;
		}
	}
}

Not tested though, I am not using nginx.


#4

I figured as much, here’s the current config. As I said previously I’ve changed the ‘client_max_body_size’ from 0 to 50000 with no difference

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;
#multi_accept on;
}

http {

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    client_max_body_size 24000M;
    # server_tokens off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;



    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;


    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;


    gzip on;
    gzip_disable "msie6";

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;

}


#5

Increase post_max_size=24000M and upload_max_filesize=24000M in php.ini as well.


#6

Done, error still persists


#7

Problem fixed. Turns out the ‘include /etc/ginx/sites-enabled/*’ has a secondary config with a ‘‘client_max_body_size = 100M’ in there with it. Just excluded that line and I can upload to my hearts content. Thanks to everyone for their assistance.


#8

BTW: you can call nginx -T to output the loaded configuration. That makes it easier to find something like that.