Unable to login to DAVx5 on Android to synchronize Nextcloud Contacts and Calendars
Issue
You try to login on DAVx5 on your Android device to synchronize your contacts and calendars. You get an error message and the apps ofers you to check to logs.
When you check the logs, you see a message saying : Moved Permanently (Error code 302) when pointing to the URL /remote.php/dav
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://DOMAIN/remote.php/dav/">here</a>.</p>
Problem
You may be behind a revers proxy and the redirection does not work properly.
Workaround
You need to modify your configuration to redirect with the full URL
For Apache
- Login to your server as an administrator
- Go to your Nextcloud root folder
- Edit your .htaccess file
- Change the two following lines so the full path is included
Before
RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
After
RewriteRule ^\.well-known/carddav https://mydomain.tld/remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav https://mydomain.tld/remote.php/dav/ [R=301,L]
(Replace mydomain.tld by your own domain name… of course)
Source
https://github.com/nextcloud/docker/issues/528
Was this post helpful?
Let us know if you liked the post. That’s the only way we can improve.