Heroku Nginx HTTP 413实体太大

Heroku Nginx HTTP 413实体太大,heroku,nginx,laravel-5,Heroku,Nginx,Laravel 5,上传4MB文件时出现错误413。我已经在public/文件夹中创建了一个.user.ini文件。允许最多10 MB的文件 因此,我在我的nginx.conf上使用了client\u max\u body\u size,但仍然得到413 location / { index index.php; try_files $uri $uri/ /index.php?$query_string; client_max_body_size 10M; } 这种配置是因为我使用的是la

上传4MB文件时出现错误413。我已经在
public/
文件夹中创建了一个
.user.ini
文件。允许最多10 MB的文件

因此,我在我的
nginx.conf
上使用了
client\u max\u body\u size
,但仍然得到413

location / {
    index index.php;
    try_files $uri $uri/ /index.php?$query_string;
    client_max_body_size 10M;
}
这种配置是因为我使用的是
laravel5

这是我的
Procfile

web: vendor/bin/heroku-php-nginx -C nginx.conf public/

我做错什么了吗?

可能有点晚了,但为了解决这个问题,请将您的
客户端移动到最大尺寸10米位置部分之外。像这样:

client_max_body_size 10M;

location / {
    index index.php;
    try_files $uri $uri/ /index.php?$query_string;
}

有关heroku如何包含此文件的参考,请参阅。

在何处添加这些设置?在何处定义配置。如果您的程序文件看起来像
web:vendor/bin/heroku-php-nginx-C nginx.conf public/
,那么它就是nginx.conf