我有问题,mod_xsendfile。当我使用绝对路径(如 /home/foo/foo.txt )发送到 Apache 标头时,一切正常。但是当我使用相对链接时,我会在 Apache 的日志中出现奇怪的错误。
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 webmaster@localhost
ServerName serv1
JkMount / ajp13
JkMount /* ajp13
</VirtualHost>