X-Sendfile ownCloud 404 error

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>

david8

Posted 2015-04-21T19:55:45.413

Reputation: 161

Answers

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

E.Go.

Posted 2015-04-21T19:55:45.413

Reputation: 11

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.

Morris Jobke

Posted 2015-04-21T19:55:45.413

Reputation: 145