I have been strongly recommended to use XSendfile since we are serving quite large files from our server. The server is running Cpanel. Previously we were using a straight force
I hope this will help someone...
I was having this kind of problem: whenever and whatever -> 0 bytes
I solve this moving the
XSendFile On
XSendFilePath /var/1000italy/data/offline
from the virtualHost section
DocumentRoot "/var/{{ app_name }}/web"
ServerName {{ app_name }}.dev
# here was the problem
XSendFile On
XSendFilePath /var/1000italy/data/offline
allow from all
Options -Indexes
AllowOverride All
ErrorLog /var/log/apache2/{{ app_name }}_error.log
CustomLog /var/log/apache2/{{ app_name }}_access.log combined
to the directory section
DocumentRoot "/var/{{ app_name }}/web"
ServerName {{ app_name }}.dev
allow from all
Options -Indexes
AllowOverride All
# HERE EVERYTHING WORKS FINE
XSendFile On
XSendFilePath /var/1000italy/data/offline
ErrorLog /var/log/apache2/{{ app_name }}_error.log
CustomLog /var/log/apache2/{{ app_name }}_access.log combined
Ciao