Can anyone tell me how to get x_send_file working with mongrel 1.1.1
and apache 2.2? I’ve installed the mod_xsendfile apache module from
http://tn123.ath.cx/mod_xsendfile/ and it works fine serving content
from a PHP script, but I can’t get it to work with my single Mongrel
instance and ProxyPass.
I’m using the following Apache configuration:
ProxyPass /images !
ProxyPass /stylesheets !
#continue with other static files that should be served by apache
Alias /images /home/user/myserver/public/images
Alias /stylesheets /home/user/myserver/public/stylesheets
#continue with aliases for static content
when I use x_send_file with the following in one of my rails
x_send_file(@order.file_name, :type => ‘text/plain;
charset=us-ascii’, :disposition => ‘inline’)
I get the following error in my apache log:
No such file or directory: xsendfile: cannot open file:
I’ve tried a few things but I can’t seem to get past this error… I
had a feeling it was because Apache was still trying to pass the
request through the proxy, which was prepending the
http://localhost:8000 to the url, which may have cause dthe error, but
I’ve tried it with a stylesheet file in my public/stylesheets dir
(which is not proxied - ie will still be served if Mongrel is shut
down) and I still get the same error.
I have a feeling I’m missing something pretty simple, since it seems
that most other people have managed to get this up and running without
too much difficulty. If anyone has any suggestions, please let me