Zum Inhalt

Schlagwort: WebDAV

Nextcloud Client Cannot Connect to Server

I’ve had a strange problem with a very hard to find solution after I set up my second Nextcloud Server, version 12.0.3. The Webinterface was working fine but the Nextcloud client couldn’t connect to the server.

In the Nextcloud log files the following error message was displayed:
Sabre\DAV\Exception\NotAuthenticated: No public access to this resource., No ‚Authorization: Basic‘ header found. Either the client didn’t send one, or the server is misconfigured, No ‚Authorization: Bearer‘ header found. Either the client didn’t send one, or the server is mis-configured, No ‚Authorization: Basic‘ header found. Either the client didn’t send one, or the server is misconfigured

[internal function] Sabre\DAV\Auth\Plugin->beforeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/vhosts/vault111.de/nextcloud.vault111.de/3rdparty/sabre/event/lib/EventEmitterTrait.php – line 105: call_user_func_array(Array, Array)
/var/www/vhosts/vault111.de/nextcloud.vault111.de/3rdparty/sabre/dav/lib/DAV/Server.php – line 466: Sabre\Event\EventEmitter->emit(‚beforeMethod‘, Array)
/var/www/vhosts/vault111.de/nextcloud.vault111.de/3rdparty/sabre/dav/lib/DAV/Server.php – line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/vhosts/vault111.de/nextcloud.vault111.de/apps/dav/lib/Server.php – line 258: Sabre\DAV\Server->exec()
/var/www/vhosts/vault111.de/nextcloud.vault111.de/apps/dav/appinfo/v2/remote.php – line 33: OCA\DAV\Server->exec()
/var/www/vhosts/vault111.de/nextcloud.vault111.de/remote.php – line 162: require_once(‚/var/www/vhosts…‘)
{main}

The problem could be solved by adding the following line in the Apache vhost config:
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1