I am having a problem using xsendfile with my Rails 3 application.
I use capistrano to manage deployments and in each version, there is a symbolic link to the shared / assets directory (for example, / var / www / site / releases / 1234 / assets => / var / www / site / shared / assets). The problem is that XSendFile does not seem to follow symbolic links. In my apache logs, I see the following error:
The given path was above the root path: xsendfile: unable to find file: /var/www/site/releases/20110406205607/assets/pdfs/2/original/test.pdf
I have an XSendFilePath configuration as
XSendFilePath /var/www/site/shared/assets
If I switch the configuration to:
XSendFilePath /var/www/site/releases
Then everything works fine. So I have a few questions:
1) Is there a way to get XSendFilePath to follow a symbolic link?
2) Is there a security risk when configuring XSendFilePath on my release directory? In other words, do I open access to all of these files?
ruby-on-rails symlink capistrano x-sendfile
bostonou
source share