相对路径在 Apache 的 mod_xsendfile 中不起作用
我的 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>
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@localhost
ServerName serv1
JkMount / ajp13
JkMount /* ajp13
</VirtualHost>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您需要启用
才能使用相对链接发送文件。
I think you need to enable
In order to send the files using relative links.