2011-06-03 38 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 

爲了使用相對鏈接發送的文件。