413: request too large on HTTPS

I saw several questions with the same problem, and most of them offer the following solutions

  • type post_max_size in the php.ini (set to 8M)
  • increse upload_max_filesize in php.ini (set to 8M)
  • set the directive LimitRequestBody to httpd.conf (set the value 8388608 = 8M)

none of them worked for me!

Then I restarted the apache service, but still remained the same problem. the form I am trying to submit has only 5 fields (two flags, 2 choices, one file), I upload a file with a size of 653 KB and do not work (we work if the file is less than 80 KB), this problem has never happened before.

Setup:

  • Archlinux
  • x86_64 Linux 3.10.6-2-ARCH
  • PHP 5.4.18
  • Apache / 2.2.25
  • SSL virtual host
+4
source share
1 answer

I found that the problem is that when I enable SSL, it has the default SSLRenegBufferSize at 131072 (128k).

Adding this directive to 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)

+6
source

Source: https://habr.com/ru/post/1497475/


All Articles