Skip to main content

XSendFile serves zero byte files

Comments

5 comments

  • Benjamin D.
    Problem solved. This can be closed.
    0
  • Infopro
    Problem solved. This can be closed.

    What was the solution to your issue?
    0
  • Benjamin D.
    After very long hours of pulling my out and finding absolutely nothing helpful online, I stumbled on the solution completely randomly. To make XSendFile work under CentOS 7.5 you have to put the directory rules under a custom included CONF file (both SSL and STD) without the actual DIRECTORY node. So instead of: XSendFile on XSendFilePath /home2/thatuser/public_html/files/ It had to be put like this: XSendFile on XSendFilePath /home2/thatuser/public_html/files/ I cannot believe it took 4 hours to fix this. I would have thought EasyApache4 would have been easier. I kind of miss EA3, where you could install custom EA modules. It was working better and setup was simpler a couple years ago. Nowadays, everything is so complicated and obfuscated for no valid reason.
    0
  • cPanelMichael
    Hello @Benjamin D., Part of the issue in this particular case is that mod_xsendfile isn't a standard module offered by Apache and it was never fully developed with Apache version 2.4 in-mind. There's some discussion of this on the following StackOverflow thread: Are there any other custom Apache modules not offered in EasyApache 4 that you'd like to see offered in the future? Thank you.
    0
  • Benjamin D.
    Yes I remember that SO post but it did not provide anything useful in my case, what it did provide is a .c file to compile, but I didn't want to go that route in fear to mess something up on my server. No really, EA4 experimental RPM gave me part of the solution by letting EA4 install the XSendFile module in WHM and what was left for it to work was the configuration bit I mentioned in my previous post... which I found out completely randomly after trying for 4 hours. If I had a suggestion is to move XSendFile module to the standard EA4 RPM. XSendFile has worked the same for at least a decade, so there's no reason to hide it from the standard EA4. It really works fine and there's nothing comparable in the standard modules. Props to this gentleman:
    0

Please sign in to leave a comment.