2011-06-03 99 views
0

我有问题,使用mod_xsendfile。当我发送到绝对路径的Apache头(如/home/foo/foo.txt)一切正常。但是当我使用相对链接时,我在Apache的日志中出现奇怪的错误。相对路径在Apache的mod_xsendfile中不起作用

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 

这是我的站点配置(我用的mod_jk)

XSendFile on 
XSendFilePath /home/user/binares/ 

<VirtualHost *:80> 
    ServerAdmin [email protected] 
    ServerName serv1 

    JkMount/ajp13 
    JkMount /* ajp13 

</VirtualHost> 
+0

你确定不应该是./test.txt – 2011-06-03 13:34:57

回答

0

我认为你需要启用

XSendFileAllowAbove On 

为了使用相对链接发送的文件。