Ruby-on-rails Apache 对 POST 请求大小的限制

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11686288/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 03:45:42  来源:igfitidea点击:

Apache's limit to POST request size

ruby-on-railsruby-on-rails-3apachepostpassenger

提问by roman

Is there any limit of the POSTrequest size in apache? What is the default value of this limit and is there any way to increase it? If it matters, Railsapplication is started on this server using passenger.

POSTapache中的请求大小是否有任何限制?这个限制的默认值是多少,有什么办法可以增加它?如果重要,Rails应用程序将使用乘客在此服务器上启动。

回答by aefxx

The limit in Apache is set via the LimitRequestBodydirective and defaults to 0:

Apache 中的限制是通过LimitRequestBody指令设置的,默认为0

This directive specifies the number of bytes from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a request body.

该指令指定请求正文中允许的从 0(表示无限制)到 2147483647 (2GB) 的字节数。

Take a look at the full description of Apache's LimitRequestBody directive.

查看 Apache 的LimitRequestBody 指令的完整描述。

Besides that Railsmay impose a limit itself (cant't tell though b/c I've never programmed in Ruby).

除此之外,Rails它本身可能会施加一个限制(虽然 b/c 我从来没有用 Ruby 编程过,但不能说)。