<p>You need to configure both nginx and php to allow upload size.</p>

<p><strong>Nginx configuration</strong></p>

<blockquote>
  <p>The client_max_body_size directive assigns the maximum accepted body size of client request, indicated by the line Content-Length in the header of request. If size is greater the given one, then the client gets the error "Request Entity Too Large" (413).</p>
</blockquote>

<p><a href="https://web.archive.org/web/20170816152117/http://www.codingslover.com/2015/05/413-request-entity-too-large-error-with.html" rel="nofollow noreferrer">Source</a>.</p>

CC BY-SA 3.0
2015-04-10T09:42:17.803Z
2018-02-22T07:37:07.823Z
2018-02-22T07:37:07.823Z
Elangovan
<p>Spent a whole day working with the administrator at our web host trying to solve this problem. All the fixes suggested here and other sites did not help. The problem turned out to be with my third party VPN. Once that connections was turned off I was able to upload and install a Joomla extension without problem.  So if you are getting a 413 message and nothing seems to fix it check that your VPN is not the culprit.</p>

CC BY-SA 3.0
2015-04-23T04:38:01.860Z
2015-04-23T04:38:01.860Z
Harry Couchman
<p>413 errors occur when the request body is larger than the server is configured to allow. Here’s how you can fix it, depending on your web server:</p>
<ul>
<li><p><strong>Apache:</strong> Set the <a href="http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestbody" rel="nofollow noreferrer">LimitRequestBody directive</a> in either your httpd.conf file or a local .htaccess file. (<a href="https://stackoverflow.com/a/3719358/1688568">https://stackoverflow.com/a/3719358/1688568</a>)</p>
</li>
<li><p><strong>Nginx:</strong> Set the <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size" rel="nofollow noreferrer">client_max_body_size</a> directive in nginx.conf (<a href="http://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/" rel="nofollow noreferrer">http://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/</a>)</p>
</li>
<li><p><strong>IIS:</strong> Set the uploadreadaheadsize config setting (<a href="https://web.archive.org/web/20160204040121/http://blogs.msdn.com:80/b/jiruss/archive/2007/04/13/http-413-request-entity-too-large-can-t-upload-large-files-using-iis6.aspx" rel="nofollow noreferrer">https://web.archive.org/web/20160204040121/http://blogs.msdn.com:80/b/jiruss/archive/2007/04/13/http-413-request-entity-too-large-can-t-upload-large-files-using-iis6.aspx</a>)</p>
</li>
</ul>
<p>You also might want to try increasing PHP’s <a href="http://de.php.net/manual/en/ini.core.php#ini.upload-max-filesize" rel="nofollow noreferrer">upload_max_filesize</a> and <a href="http://php.net/manual/en/ini.core.php#ini.post-max-size" rel="nofollow noreferrer">post_max_size</a> settings in php.ini or using the <code>php_value</code> directive in your .htaccess file if you’re using Apache (<a href="http://davidwalsh.name/php-values-htaccess" rel="nofollow noreferrer">http://davidwalsh.name/php-values-htaccess</a>).</p>

CC BY-SA 3.0
2017-03-11T02:12:34.120Z
From the client side, you could try to switch to SSH, that's what got it working for me. Here is the manual I scripted on the topic: https://github.com/gitblit/gitblit/issues/461
milosmns
CC BY-SA 4.0
2014-09-03T16:27:40.173Z
2021-02-12T15:39:25.287Z
2021-02-12T15:39:25.287Z
Brandon Kelly
<p>In assets when uploading a medium size file I get this error:</p>

<blockquote>
  <p>Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)</p>
</blockquote>

<p>What does it mean? And how to fix?</p>

<assets><error-message><upload>
413 “Request Entity Too Large” error with uploading a file
# 413 “Request Entity Too Large” error with uploading a file

(Asked by: username_0 on 2014-09-03)

In assets when uploading a medium size file I get this error:

> Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)

What does it mean? And how to fix?

**Tags:** assets, error-message, upload


---

## 3 answers

### Answer by username_3 on 2014-09-03. Score: 48 | Accepted answer

413 errors occur when the request body is larger than the server is configured to allow. Here’s how you can fix it, depending on your web server:

* **Apache:** Set the [LimitRequestBody directive](http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestbody) in either your httpd.conf file or a local .htaccess file. (<https://stackoverflow.com/a/3719358/1688568>)
* **Nginx:** Set the [client\_max\_body\_size](http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size) directive in nginx.conf (<http://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/>)
* **IIS:** Set the uploadreadaheadsize config setting (<https://web.archive.org/web/20160204040121/http://blogs.msdn.com:80/b/jiruss/archive/2007/04/13/http-413-request-entity-too-large-can-t-upload-large-files-using-iis6.aspx>)

You also might want to try increasing PHP’s [upload\_max\_filesize](http://de.php.net/manual/en/ini.core.php#ini.upload-max-filesize) and [post\_max\_size](http://php.net/manual/en/ini.core.php#ini.post-max-size) settings in php.ini or using the `php_value` directive in your .htaccess file if you’re using Apache (<http://davidwalsh.name/php-values-htaccess>).

> **Comments:**
> **username_4**: From the client side, you could try to switch to SSH, that's what got it working for me. Here is the manual I scripted on the topic: https://github.com/gitblit/gitblit/issues/461  

---

### Answer by username_1 on 2015-04-10. Score: 2

You need to configure both nginx and php to allow upload size.

**Nginx configuration**

> The client\_max\_body\_size directive assigns the maximum accepted body size of client request, indicated by the line Content-Length in the header of request. If size is greater the given one, then the client gets the error "Request Entity Too Large" (413).

[Source](https://web.archive.org/web/20170816152117/http://www.codingslover.com/2015/05/413-request-entity-too-large-error-with.html).


---

### Answer by username_2 on 2015-04-23. Score: 1

Spent a whole day working with the administrator at our web host trying to solve this problem. All the fixes suggested here and other sites did not help. The problem turned out to be with my third party VPN. Once that connections was turned off I was able to upload and install a Joomla extension without problem. So if you are getting a 413 message and nothing seems to fix it check that your VPN is not the culprit.


---

