Apache代理服务器文件上传limi是128k? [英] Apache proxy server file upload limi is 128k?

查看:324
本文介绍了Apache代理服务器文件上传limi是128k?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行一个Apache 2.2.3代理服务器来隐藏用户的后端机器。我添加了一个文件上传服务到我的web服务;然而,大于128 kb的文件正在返回413的http状态码。我知道这意味着请求实体太大了,我已经在互联网上寻找解决方案。

我已经改变了我的php.ini文件有max_execution_time = 3000,max_input_time = 6000,memory_limit = 128M,post_max_size = 20M,upload_max_filesize = 20M,default_socket_timeout = 6000.这并没有帮助,因为我怀疑它不会。我正在从Java为Web服务进行休息调用它不是PHP。

我已经将server.xml中的maxHttpHeaderSize更改为代理连接器上的20000000,以尝试允许了解更多信息。再次,这没有做任何事情,我的限制仍然是在128 kb。

我也已经将LimitRequestBody 20000000指令添加到位置块的web服务文件将被上传。这再次没有工作。

目前所有3个都没有任何改进。我仍然只能通过代理发送最大128 kb的文件。



当我尝试直接发送文件到后端机器而不使用代理时,它工作得很好没有考虑到大小。

有关如何解决这个问题的任何建议将非常感激。
谢谢。

解决方案

我已经知道问题出在哪里,128k的限制发生在哪里。



在mod_ssl中,它使用默认的ssl协商大小为128k,当进行上传时,我们会自动重新协商以达到安全目的。

我必须在位置和目录中添加和修改需要大于128k缓冲区重新协商的SSLRenegBufferSize指令。这对我来说就像一个魅力。



希望它可以帮助任何人遇到这个限制,或者有这个问题。

I am running an Apache 2.2.3 proxy server to hide my backend machines from users. I added a file upload service to my webservices; however, files larger than 128 kb are returning http Status Code of 413. I know this means Request entity too large, and I have scoured the internet looking for a solution.

I have changed my php.ini file to have max_execution_time = 3000, max_input_time = 6000, memory_limit = 128M, post_max_size = 20M, upload_max_filesize = 20M, default_socket_timeout = 6000. This didn't help, as I suspected it wouldn't. I am doing a Rest call from Java for the webservice it is not PHP.

I have changed the maxHttpHeaderSize in server.xml to 20000000 on the proxy connector to try to allow for more information to flow through. Again this did nothing and my limit is still at 128 kb.

I have also added the LimitRequestBody 20000000 Directive to the Location block for the webservice files will be uploaded from. This again didn't work.

Currently all 3 are in place without any improvement. I am still only able to send max 128 kb files through the proxy.

When I try to send a file directly to the backend machine without using the proxy it works perfectly fine without taking into account the size.

Any suggestions on how to fix this will be very much appreciated. Thank you.

解决方案

I have figured out what the problem was, and where the 128k limit occurs.

In mod_ssl it uses the default ssl negotiation size as 128k, when doing an upload we automatically renegotiate for security purposes.

I had to add and modify the SSLRenegBufferSize directive in the Locations and Directories that needed a larger than 128k buffer on renegotiation. This has worked like a charm for me.

Hope it helps anyone else that experiences this limit, or had this question.

这篇关于Apache代理服务器文件上传limi是128k?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆