Apache proxy server file upload limi is 128k?

元气小坏坏 提交于 2020-01-07 00:36:14

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/8932849/apache-proxy-server-file-upload-limi-is-128k

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!