Chris S.
Chris S.

Reputation: 333

Apache with mod_ssl and mod_proxy returns 413 Request Entity Too Large

I have a apache which uses SSL and ProxyReverse which transfers the incomming request to a simple rest webservice running on a tomcat. The problem I am now facing is that my apache returns an HTTP 413 Request Entity Too Large if send an POST Request with a JSON body to my webservice.

The Request has the following headers:

Accept: application/json, application/*+json
Content-Type: application/json;charset=UTF-8
Content-Length: 146226
User-Agent: Java/1.7.0_45
Connection: keep-alive
Host: myhost

Linux Version (AWS):

[root@myhost ~]# uname -r
Linux myhost 4.4.8-20.46.amzn1.x86_64 #1 SMP Wed Apr 27 19:28:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Apache Version:

[root@myhost ~]# httpd -version
Server version: Apache/2.2.31 (Unix)
Server built:   Mar  7 2016 23:50:21

In my opinion this is really strange because the content length is not really large so i don't know why my apache just refuse that request...

I really hope you can help me with that! :)

Upvotes: 1

Views: 3610

Answers (1)

Chris S.
Chris S.

Reputation: 333

I just found the answer by myself I just increase the the SSLRenegBufferSize in my apache conf and now everything works fine:

<Location />
    Allow from all
    SSLRenegBufferSize 20982000
    SSLVerifyClient require
    SSLVerifyDepth 5
</Location>

Upvotes: 3

Related Questions