09 October 2008

Apache https proxying Mongrel with file upload

We had a Ruby on Rails form that did a POST of some form data including a file upload. The setup was Apache 2.2 proxying a bunch of mongrels on a Windows server. Port 80 was set to redirect to 443 via a rewrite rule. The proxy modules that we were using included proxy_http_module, proxy_balancer_module, and proxy_module. With that setup the file upload was failing. It appeared to timeout and not even hit the controller method that handled the POST.

We made one change to make the file upload work over https to proxied mongrels and that was to enable the proxy_connect_module.