简体   繁体   English

Apache:请求实体太大

[英]Apache: Request Entity Too Large

I'm working on a laravel project and file uploading is working correctly on smaller files but when I tried to upload a 400+ Meg file of sample data which is a text file I get 我正在做一个laravel项目,文件上传在较小的文件上可以正常工作,但是当我尝试上传样本数据的400兆以上的Meg文件时,我得到了

Request Entity Too Large

The requested resource
/table/create/import
does not allow request data with POST requests, or the amount of data
provided in the request exceeds the capacity limit.

I have checked my php.ini file and tried setting the following per instructions I have found 我已经检查了我的php.ini文件,并按照发现的说明尝试设置以下内容

upload_max_filesize = 5000M
post_max_size = 10000M
max_input_time = 300
max_execution_time = 500

I also have tried to set LimitRequestBody in the httpd.conf file on the folder where the files get uploaded to. 我还尝试在文件上传到的文件夹的httpd.conf文件中设置LimitRequestBody。

<Directory "/var/www/html/project-css/storage/app/flatfiles">
    LimitRequestBody 0 
</Directory>

I'm running this in a vagrant setup with centos. 我正在使用centos在无所事事的环境中运行它。 I have been looking into this for a few days now and I haven't found a answer. 我已经研究了几天,但没有找到答案。 Anybody have any ideas? 有人有什么想法吗?

发现问题出在mod_security.conf中的mod_security上,我能够增加SecRequestBodyLimit的大小来上传文件。

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

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