File Upload Error "Requested uri is out of base uri" Webdav/Sabre

Hello Community,

running Nextcloud 10.0 stable on Ubuntu 16.04 LTS with PHP7 modules, everything working well so far.

When i upload through clients i get an error saying:

Exception: {“Message”:“Requested uri (/nextcloud//remote.php/webdav/Rechnungen/R16002-14.10.2016-.pdf) is out of base uri (/nextcloud//remote.php/webdav/)”,“Exception”:“LogicException”,“Code”:0,“Trace”:"#0 /var/www/nextcloud/apps/dav/lib/Connector/Sabre/LockPlugin.php(60): Sabre\HTTP\Request->getPath()\n#1 [internal function]: OCA\DAV\Connector\Sabre\LockPlugin->getLock(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#2 /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(446): Sabre\Event\EventEmitter->emit(‘beforeMethod’, Array)\n#4 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#5 /var/www/nextcloud/apps/dav/appinfo/v1/webdav.php(60): Sabre\DAV\Server->exec()\n#6 /var/www/nextcloud/remote.php(165): require_once(’/var/www/nextcl…’)\n#7 {main}",“File”:"/var/www/nextcloud/3rdparty/sabre/http/lib/Request.php",“Line”:214,“User”:“User01”}

Note: The Logging shows that User01 logged in successfully just before the error occurs!

Thank you in advance!

Do you have this somewhere in your apache config (supposing you are using apache):

<Directory /var/www/nextcloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off

 SetEnv HOME /var/www/nextcloud
 SetEnv HTTP_HOME /var/www/nextcloud


Thanks for the quick response!

yes we are using apache, I checked the /etc/apache2/sites-available/nextcloud.conf
and the code you just posted is the same. (already existed)

I’ve also done the additional apache server configurations from the Documentation, unfortunately with the same error as result.

Did you setup redis as filelocking cache? Not sure if file-locking is creating this error (LockPlugin->getLock(Object(Sabre\HTTP\Request)). With redis you normally have a better performance, so I would try this.

I tried to set up memcached some days ago, but it did not work, since i still have the alert to install PHP Memory Cache on the Nextcloud admin page…

I did the following steps back then:

sudo apt-get install memcached
sudo apt-get install php-memcached
sudo service apache2 restart

edit file /var/www/nextcloud/config.php and added:

‘memcache.local’ => ‘\OC\Memcache\Memcached’,
‘memcache.distributed’ => ‘\OC\Memcache\Memcached’,
‘memcached_servers’ => array(
array(‘localhost’, 11211),

So as I said, this did not work out, so I’m going to uninstall memcached and give it a go with Redis
as described in the documentation. (i found this guide on redis@PHP7, planning to do it that way:

I successfully installed redis on the server, working just fine with no errors. That uploading error from post #1 still occurs though… Any idea anyone?

You seem to have two slashes in your URL, /nextcloud//remote.php/webdav/, can you check your configuration files if you added somewhere two slashes by accident? Could also be within rewrite rules if you use some.

No, i did not add two slashes in my configuration files by accident, I still have the same problem. What kind of possible reasons do you think are possible?

edit: Jep, two backslashes was the problem, the URL needed to be like server/nextcloud instead of server/nextcloud/ on client settings

The client should be able to figure that out itself. Please create a bug report on: (could also be an upstream problem)