大网数据广告活动
服务器运维问答

Is mod_xsendfile deprecated?

· 52CE 我爱测

I know this is a stupid question, but I could not find the Information anywhere. I am maintaining a website for an old client and up until now I used the X-SENDFILE header to control the Access to a rather large file. His Server …

问题原文

原帖链接 · itd · CC BY-SA 3.0

I know this is a stupid question, but I could not find the Information anywhere. I am maintaining a website for an old client and up until now I used the X-SENDFILE header to control the Access to a rather large file.

His Server administrators now updated Apache which broke the website. After doing some research I found out, that I had to remove the XSendFileAllowAbove Option and instead add XSendFilePath. Since this option apparently can not be set in the .htaccess file (I read about that, I also tried it to be sure) the server administrators have to add it directly. However, they refuse to do that and say that mod_xsendfile is deprecated. I searched to verify that but can not find it anywhere.

Also, they refuse to suggest an alternative, so if you guys know for any I¨d be thankful :).

The file is too large to be served with PHP (at least not easily), I have no access to the server, I can only access the website code.

EDIT

As soon as I posted the question I found this post, which seems to at least suggest that mod_xsendfile is working perfectly well in Apache 2.4: https://superuser.com/questions/1035459/is-mod-xsendfile-not-compatible-with-apache-2-4 This does not answer my question completely, but at least it's a start and may help someone searching for the same and finding this question.

社区高分解答

原帖链接 · Esa Jokinen · CC BY-SA 4.0

Deprecated here doesn't mean it won't work with Apache 2.4, but that it's against their own policy of quality software. After all, mod_xsendfile:

  • is not a standard Apache module officially supported.
  • needs to be compiled separately; not in any repository.
  • was originally designed for Apache 2 & 2.2.
  • hasn't been maintained since 2011; for 6 years.

Although the module is simple, using that kind of module may expose the system to security threats. Therefore, the limitation seems reasonable, and you definitely wouldn't get the module on any shared hosting, either.

Hopefully someone here can suggest alternative solutions!

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-10-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。