Don*_*nie 4 amazon-web-services laravel forge
错误:413请求实体太大
我试图增加upload_max_filesize对20M使用Edit PHP FPM Configuration和Edit PHP CLI Configuration在Laravel锻造工具.它成功保存了我的设置,但更改似乎没有生效.我试过重启nginx和服务器.
环境:
Lor*_*ley 12
正如@dave-alvarez 所提到的,Laravel Forge 中有一个设置可以做到这一点。
php.ini的upload_max_filesize。正在更新,因为这是该主题搜索的第一个搜索引擎结果:
Forge现在具有内置设置,您可以通过转到服务器详细信息页面,然后从左侧菜单中单击PHP进行更新。您会看到一个表格,用于更改最大文件大小。
我错过了一块.这是完整的答案.
Nginx配置
将以下行添加到http或服务器或位置上下文以增加nginx.conf中的大小限制:
# set client body size to 20M #
client_max_body_size 20M;
Run Code Online (Sandbox Code Playgroud)
PHP配置
编辑php.ini并设置以下指令:
;This sets the maximum amount of memory in bytes that a script is allowed to allocate
memory_limit = 256M
;The maximum size of an uploaded file.
upload_max_filesize = 20M
;Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize
post_max_size = 30M
Run Code Online (Sandbox Code Playgroud)
资料来源:http://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/
| 归档时间: |
|
| 查看次数: |
3945 次 |
| 最近记录: |