开发者

Relative paths don't work in mod_xsendfile at Apache

I have problem, with mod_xsendfile. When I send to Apache header with absolute path (like /home/foo/foo.txt ) everything works fine. But when I use relative links I get strange errors in Apache's logs.

X-Sendfile: ../test.txt
No such file or directory: xsendfile: cannot open file: test.txt


X-Sendfile: test.txt
No such file or directory: xsendfile: cannot open file: test.txt/test.txt


X-Sendfile: te%20st.txt
No such file or directory: xsendfile: cannot open file: te st.txt/te%20st.txt

This is my site configuration (I use mod_jk)

XSendFile on
XSendFilePath /home/user/binares/

<VirtualHost *:80>
    ServerAdmin webmaster@开发者_Python百科localhost
    ServerName serv1

    JkMount / ajp13
    JkMount /* ajp13

</VirtualHost>


I think you need to enable

XSendFileAllowAbove On

In order to send the files using relative links.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜