• server
  • hacker
  • matrix
  • robot
  • web

How to fix "413 Request Entity Too Large" Apache error

Written by Mike Ennulat. Posted in Server-en

You might discover the following error on Apache webserver:

413 Request Entity Too Large

There are several causes for this type of error.

First you should check your PHP configuration. It is important to find the correct php.ini file. I.e. with Joomla you may check

System - System Information - PHP Information - Loaded Configuration File

Check and edit the following parameters in this php.ini file. The standards are pretty low and you might get problems with uploading files. This is my example configuration:

upload_max_filesize = 511M
post_max_size = 511M
memory_limit = 512M

Additionally you might want to add following Apchache directive either in your .htaccess, http.conf or vhost file.  

LimitRequestBody 535822336

The number is the total of bytes, so in this case we have 511M as well.

Last option which should solve the problem now is to edit modsecurity.conf (usually in /etc/modsecurity). Edit the following parameters:

SecRequestBodyLimit 535822336
SecRequestBodyNoFilesLimit 262144

I hope,  these solutions were able to solve our problem. 

Comments powered by CComment