4

I have Apache2 configured to proxy all traffic directed to a specific virtual host to a local tomcat instance.

All is good and fine but for multipart posts larger than ~100kb. Such posts fail on the tomcat end with an exception like SocketTimeoutException.

If I connect directly to Tomcat (which listens on a port != 80) then all posts are handled just fine.

The Apache virtual host config goes like this:

NameVirtualHost * SetOutputFilter DEFLATE <VirtualHost *> ServerName foo.bar.com ErrorLog c:/wamp/logs/foo_error.log CustomLog c:/wamp/logs/foo_access.log combined ProxyTimeout 60 ProxyPass / http://localhost:10080/foo/ ProxyPassReverse / http://localhost:10080/foo/ ProxyPassReverseCookieDomain localhost bar.com ProxyPassReverseCookiePath /foo / </VirtualHost> 

I tried browsing the Apache2 and mod_proxy docs but found nothing useful. Any idea why Apache2 refuses to proxy requests bigger than X bytes ?

Thanks!

1 Answer 1

3

You may need to set the proxy-sendcl environment variable to force apache to send along the content-length header for large multipart requests:

SetEnv proxy-sendcl 

See http://httpd.apache.org/docs/current/mod/mod_proxy.html#request-bodies

You must log in to answer this question.