开发者

How do I enable downloading using X-sendfile in rails3 from a directory other than the public directory?

I have enabled the XSendFile module in Apache 2 running on Ubuntu 10.04. I have added the XSendFile on directive and开发者_JAVA百科 restarted the Apache server successfully. When I add the XSendFilePath /path/to/dir directive and restart Apache I get the following error:

Invalid command 'XSendFilePath', perhaps misspelled or defined by a module not included in the server configuration

Not sure what I'm doing wrong?


On 10.04 Lucid, the version of XSendFile installed by apt by default is 0.9.2:

http://packages.ubuntu.com/lucid/libapache2-mod-xsendfile

The directive XSendFilePath replaced XSendFileAllowAbove in version 0.1.0, so for 0.9.2:

https://tn123.org/mod_xsendfile/

Try using XSendFileAllowAbove if you're on anything less than 0.1.0


Do you have the x-sendfile module installed and enabled in apache? Run "apachectl -M" to see a list of all of modules. You may have to build it, see https://tn123.org/mod_xsendfile/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜