Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.