Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

413: Request Entity Too Large on HTTPS

Tags:

php

https

apache

I've seen several questions with the same problem and most propose the following solutions

  1. increse the post_max_size in the php.ini file (set to 8M)
  2. increse upload_max_filesize in php.ini file (set to 8M)
  3. set the LimitRequestBody directive in httpd.conf (set to 8388608 = 8M)

none of them worked for me!

Then I restarted the apache service but even still the same problem. the form I am trying to send has only 5 fields (two checkboxes, 2 selects, one file), I'm uploading a file of 653KB and dont work (work if the file is less 80K), never had this problem before.

Setup:

  • ArchLinux
  • x86_64 Linux 3.10.6-2-ARCH
  • PHP 5.4.18
  • Apache/2.2.25
  • Virtual host with SSL enabled
like image 485
rkmax Avatar asked Aug 16 '13 17:08

rkmax


1 Answers

I found that the problem is when I have SSL enabled, it has a default configuration SSLRenegBufferSize in 131072 (128k).

Adding this directive in the virtual host directory I can increase the size and the error no longer appears:

<VirtualHost *:443>
   # ...
   <Directory ...>
        #...
        SSLRenegBufferSize 8388608 # 8M
    </Directory>    
</VirtualHost>

add only

SSLRenegBufferSize 8388608 (without # 8M )

like image 186
rkmax Avatar answered Sep 22 '22 23:09

rkmax