简体   繁体   English

413:HTTPS 请求实体太大

[英]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)增加php.ini文件中的post_max_size (设置为8M)
  2. increse upload_max_filesize in php.ini file (set to 8M) php.ini文件中增加upload_max_filesize (设置为8M)
  3. set the LimitRequestBody directive in httpd.conf (set to 8388608 = 8M)httpd.conf设置LimitRequestBody指令(设置为 8388608 = 8M)

none of them worked for me!他们都没有为我工作!

Then I restarted the apache service but even still the same problem.然后我重新启动了apache服务,但仍然是同样的问题。 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.我尝试发送的表单只有 5 个字段(两个复选框,2 个选择,一个文件),我正在上传 653KB 的文件并且不起作用(如果文件小于 80K,则工作),以前从未遇到过这个问题。

Setup:设置:

  • ArchLinux ArchLinux
  • x86_64 Linux 3.10.6-2-ARCH x86_64 Linux 3.10.6-2-ARCH
  • PHP 5.4.18 PHP 5.4.18
  • Apache/2.2.25 Apache/2.2.25
  • Virtual host with SSL enabled启用 SSL 的虚拟主机

I found that the problem is when I have SSL enabled, it has a default configuration SSLRenegBufferSize in 131072 (128k).我发现问题是当我启用 SSL 时,它的默认配置SSLRenegBufferSize131072 (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 ) SSLRenegBufferSize 8388608(不带#8M)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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