0

I have a problem with X-Sendfile on Apache on Debian with ownCloud. When I want to download single file I got an error:

The requested URL /owncloud/index.php/apps/files/ajax/download.php was not found on this server.

My config in sites-enabled/000-default (and 000-default-ssl) is Webserver root is /media/usb/www/ and ownCloud data folder is /media/usb/owncloud/data

<Directory /media/usb/www/owncloud>
    Options -Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    SetEnv MOD_X_SENDFILE_ENABLED 1
    XSendFile On
    XSendFilePath /tmp/oc-noclean
    XSendFilePath /media/usb/owncloud/data
</Directory>
1

Even though five months passed…

Your config seems to be ok. Here is mine, which is working (after modifying the XSendFilePath):

<Directory /home/usr/public_html/oc>
  AllowOverride All
  Satisfy Any

  <IfModule mod_xsendfile.c>
    SetEnv MOD_X_SENDFILE_ENABLED 1
    XSendFile On
    XSendFilePath /home/usr/data/owncloud
  </IfModule>
</Directory>

ownCloud runs from /home/usr/public_html/oc and the corresponding data is in /home/usr/data/owncloud

Do not forget to restart Apache

service apache2 restart
0

Just as an update: XSendfile support was removed with ownCloud 8.2.0 - see https://github.com/owncloud/core/issues/18870 for more details. This is needed to be done because otherwise proper locking isn't possible.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.