简体   繁体   中英

413: Request Entity Too Large on HTTPS

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

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 )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM