# 413 Request Entity Too Large in Apache

> 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.

Canonical: https://scaplet.com/errors/http/413/apache

Guide Error · HTTP status codes

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.

3 min

read

8

sources

Oct 31, 2026

updated

Scaplet Editorial Team

author

413 4xx · Client error

The short answer

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.

1. [What Apache is telling you](#what-apache-is-telling-you)
2. [Find the 413 in the logs](#find-the-413-in-the-logs)
3. [Set the limit where it applies](#set-the-limit-where-it-applies)
4. [Other limits behind an Apache 413](#other-limits-behind-an-apache-413)
5. [Checklist before you reload](#checklist-before-you-reload)

30-second check

## Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F413%2Fapache%20(%22413%20Request%20Entity%20Too%20Large%20in%20Apache%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F413%2Fapache%20(%22413%20Request%20Entity%20Too%20Large%20in%20Apache%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F413%2Fapache%20(%22413%20Request%20Entity%20Too%20Large%20in%20Apache%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F413%2Fapache%20(%22413%20Request%20Entity%20Too%20Large%20in%20Apache%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

_01_LimitRequestBody facts

## What Apache is telling you

RFC 9110 defines 413 as the server "refusing to process a request because the request content is larger than the server is willing or able to process". In Apache that is `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".

Item

### Default (2.4.54 and later)

Value

`LimitRequestBody 1073741824`

Item

### Default (2.4.53 and earlier)

Value

0, unlimited

Item

### Value `0`

Value

Unlimited

Item

### Contexts

Value

server config, virtual host, directory, `.htaccess`

Item

### Override needed in `.htaccess`

Value

`All`

**A new default after an upgrade**If you upgraded from 2.4.53 or earlier and uploads above 1 GiB started failing, the compatibility note in the docs is the reason: the default changed from unlimited to 1073741824 bytes.

_02_Check it

## Find the 413 in the logs

Apache logs the cause at `LogLevel 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".

Reproduce with a known size

```
head -c 2000000 /dev/zero > /tmp/big.bin curl -i -X POST --data-binary @/tmp/big.bin https://example.com/upload
```

Raise the log level briefly to see the message

```
# httpd.conf or the vhost LogLevel info # then reload and retry the upload # apachectl configtest && apachectl graceful
```

_03_Fix it on your stack

## Set the limit where it applies

Per-location limit of 100 MiB in a vhost
Per-location limit of 100 MiB in a vhost

```
<Location "/upload"> LimitRequestBody 104857600 </Location>
```

Directory or .htaccess (needs AllowOverride All)
Directory or .htaccess (needs AllowOverride All)

```
# .htaccess in /var/www/html/uploads LimitRequestBody 104857600
```

The docs' 100K example, for reference
The docs' 100K example, for reference

```
LimitRequestBody 102400
```

The 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`.

_04_Where else a big upload can fail

## Other limits behind an Apache 413

Layer

### PHP

Setting

`upload_max_filesize`

Documented default

`2M`

Layer

### PHP

Setting

`post_max_size`

Documented default

`8M`

Layer

### Apache proxy to another server

Setting

Limits on that server

Documented default

Check its docs

Layer

### Slow uploads

Setting

`RequestReadTimeout body=...`

Documented default

`body=20,MinRate=500`; a 408 is sent if a stage is not completed

PHP limits are separate from Apache's: raising `LimitRequestBody` does not raise `upload_max_filesize`. See [413 in PHP](/errors/http/413/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.

_05_Checklist

## Checklist before you reload

1. 01 Run `apachectl configtest` (or `httpd -t`) so a typo does not take the site down.
2. 02 Search every context: `server config`, each vhost, `<Directory>`, `<Location>` and `.htaccess`.
3. 03 If the upload goes through a reverse proxy, find the limit on the next server; Apache's own limit only covers requests it receives.
4. 04 Test with a file just over the old limit and just under the new one, not a huge file, so you know which side of the line you are on.
5. 05 Set the limit per path when only one endpoint needs big bodies, as in the `<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.

_06_Explained

## SEO and crawler notes

Crawlers rarely send large bodies, so a 413 on uploads seldom touches indexing. Google treats it as a 4xx like any other: URLs returning one are not indexed. See [413 Request Entity Too Large](/errors/http/413).

Questions

## Asked a lot.

3 questions people ask next, answered from the sources on this page.

_01_ What is the default LimitRequestBody in Apache?

1073741824 bytes from httpd 2.4.54. In 2.4.53 and earlier the default was 0, which means unlimited.

_02_ Where do I set LimitRequestBody?

In server config, a virtual host, a directory or `.htaccess`. For `.htaccess` the directory needs `AllowOverride All`, which is the override the docs list.

_03_ I raised LimitRequestBody and uploads still fail. Why?

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.

Sources · 8

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- rfc-editor.org
- apache.org
- githubusercontent.com
- php.net
- google.com

1. 01 [RFC 9110: HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html) rfc-editor.org · checked 2026-11-01
2. 02 [Apache core: LimitRequestBody](https://httpd.apache.org/docs/2.4/mod/core.html) httpd.apache.org · checked 2026-11-01
3. 03 [Apache mod_reqtimeout](https://httpd.apache.org/docs/2.4/mod/mod_reqtimeout.html) httpd.apache.org · checked 2026-11-01
4. 04 [httpd source: modules/http/http_filters.c](https://raw.githubusercontent.com/apache/httpd/trunk/modules/http/http_filters.c) raw.githubusercontent.com · checked 2026-11-01
5. 05 [httpd source: modules/http/http_protocol.c](https://raw.githubusercontent.com/apache/httpd/trunk/modules/http/http_protocol.c) raw.githubusercontent.com · checked 2026-11-01
6. 06 [PHP: description of core php.ini directives](https://www.php.net/manual/en/ini.core.php) php.net · checked 2026-11-01
7. 07 [PHP: php.ini directives](https://www.php.net/manual/en/ini.list.php) php.net · checked 2026-11-01
8. 08 [How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes) developers.google.com · checked 2026-11-01

## Keep learning

[All errors](/errors)

[Learn 413 Payload Too Large in PHP uploads HTTP status codes](/errors/http/413/php) [Related 4xx errors Status codes and links](/seo-issues/4xx-errors) [Read next 413 Request Entity Too Large HTTP status codes](/errors/http/413) [Do Run a free site audit Free, about two minutes](/site-audit)

Other 413 errors
[413 Payload Too Large in PHP uploads](/errors/http/413/php) [413 Payload Too Large on Cloudflare](/errors/http/413/cloudflare) [413 Request Entity Too Large](/errors/http/413) [413 Request Entity Too Large in IIS](/errors/http/413/iis) [413 Request Entity Too Large in nginx](/errors/http/413/nginx)

Nearby in errors
[HTTP 412 Precondition Failed](/errors/http/412)

More in 413 Request Entity Too Large
[413 Payload Too Large in Express](/errors/http/413/express) [413 Payload Too Large in PHP uploads](/errors/http/413/php) [413 Payload Too Large on Cloudflare](/errors/http/413/cloudflare) [413 Request Entity Too Large in Apache](/errors/http/413/apache) [413 Request Entity Too Large in IIS](/errors/http/413/iis) [413 Request Entity Too Large in nginx](/errors/http/413/nginx)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

Run the free audit, then approve the fixes. Every change can be undone.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
