gpt4 book ai didi

Nginx client_max_body_size 不起作用

转载 作者:行者123 更新时间:2023-12-03 16:42:16 26 4
gpt4 key购买 nike

这应该是一个快速解决方案。
因此,出于某种原因,我仍然无法在不返回 413 Request Entity Too Large 的情况下成功获得大于 1MB 的请求。

例如,使用以下配置文件和大小为 ~2MB 的请求,我在 nginx error.log 中收到以下错误消息:

*1 client intended to send too large body: 2666685 bytes,

我尝试设置下面设置的配置,然后重新启动我的 nginx 服务器,但我仍然收到 413 错误。
有什么我做错了吗?
server {
listen 8080;
server_name *****/api; (*omitted*)

client_body_in_file_only clean;
client_body_buffer_size 32K;
charset utf-8;
client_max_body_size 500M;
sendfile on;
send_timeout 300s;
listen 443 ssl;
location / {
try_files $uri @(*omitted*);
}
location @parachute_server {
include uwsgi_params;
uwsgi_pass unix:/var/www/(*omitted*)/(*omitted*).sock;
}
}

预先感谢您的帮助!

最佳答案

我很惊讶你没有收到回复,但我的预感是你已经在另一个配置文件的其他地方设置了它。

看看nginx - client_max_body_size has no effect

关于Nginx client_max_body_size 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39158082/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com