Default (2.4.54 and later)
- Value
LimitRequestBody 1073741824
Fix an Apache 413: check LimitRequestBody (default changed in 2.4.54), the log line to look for, per-directory overrides and the PHP limits that sit behind it.
Apache returns 413 when a request body is larger than LimitRequestBody. Since httpd 2.4.54 the default is 1073741824 bytes (1 GiB); in 2.4.53 and earlier it was 0, meaning unlimited. So a 413 means someone set the limit, often in a vhost, directory or .htaccess. Find where it is set, raise it, reload and retry.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
LimitRequestBody: "the number of bytes that are allowed in a request body". When the client exceeds the limit, "the server will return an error response instead of servicing the request".LimitRequestBody 10737418240.htaccess.htaccessAllLogLevel info. In the httpd source, a request whose Content-Length exceeds the limit logs Requested content-length of N is larger than the configured limit of M (message AH10483, and AH01588 from the input filter). The default error page says the resource "does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit".head -c 2000000 /dev/zero > /tmp/big.bin
curl -i -X POST --data-binary @/tmp/big.bin https://example.com/upload# httpd.conf or the vhost
LogLevel info
# then reload and retry the upload
# apachectl configtest && apachectl graceful<Location "/upload">
LimitRequestBody 104857600
</Location># .htaccess in /var/www/html/uploads
LimitRequestBody 104857600LimitRequestBody 102400The directive is valid in several contexts, so the value that fires may not be the one in httpd.conf. Search all of them: grep -rn LimitRequestBody /etc/apache2 /etc/httpd /var/www.
upload_max_filesize2Mpost_max_size8MRequestReadTimeout body=...body=20,MinRate=500; a 408 is sent if a stage is not completedPHP limits are separate from Apache's: raising LimitRequestBody does not raise upload_max_filesize. See 413 in PHP. Also remember that a request body on a method that does not allow one is rejected: Apache's source logs %s with body is not allowed for %s and returns 413.
apachectl configtest (or httpd -t) so a typo does not take the site down.server config, each vhost, <Directory>, <Location> and .htaccess.<Location> example, instead of raising it server-wide.A smaller limit on public forms is a sensible default. The docs say the directive gives the administrator "greater control over abnormal client request behavior, which may be useful for avoiding some forms of denial-of-service attacks", so raise it only as far as the endpoint needs.
3 questions people ask next, answered from the sources on this page.
1073741824 bytes from httpd 2.4.54. In 2.4.53 and earlier the default was 0, which means unlimited.
In server config, a virtual host, a directory or .htaccess. For .htaccess the directory needs AllowOverride All, which is the override the docs list.
PHP has its own upload_max_filesize (2M documented default) and post_max_size (8M). Raise those too, and check any proxy or CDN in front.
Run the free audit, then approve the fixes. Every change can be undone.