Please note that there can be other reasons for this error not solvable by the info posted here.
If everything is working skip to the bottom of this post.
Problem
The login to ownCloud via WebDAV, CalDAV and CardDAV is failing. Additionally this error is shown in your data/owncloud.log:
401 No basic authentication headers were found
Description
Some Apache modules like mod_fastcgi, mod_fcgid or mod_proxy_fcgi in its default config are not passing the needed authentication headers to PHP. This is causing failed logins as the header is missing for it.
Solution
There is no “all in one” solution but you can try to add this to your Apache vhost configuration:
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
before the line “ProxyPassMatch”.
For mod_fastcgi a possible solution is to add this to the Apache config:
FastCgiConfig -pass-header Authorization
Another way to passing the Headers with mod_fastcgi is to use a statement like this:
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi-owncloud -host 127.0.0.1:9004 -pass-header Authorization -flush -idle-timeout 330
in your vhost config.
Additional info
Further reading: http://www.christianroessler.net/tech/2015/owncloud-on-debian-jessie-with-apache-2.4-and-php-fpm.html
The “No basic authentication headers were found” message can also appear in your log file if everything (like sync clients) is working. Some clients tend to send no credentials at the first connection so this message also appears if you have a non-default loglevel => option configured within your config/config.php. Reset the option from logelevel => 0/1 to its default logelevel => 2 and the message will disappear.