Connecting to instance via android phone

I am trying to use the DAVx^5 app to connect to my nextcloud instance (running on a raspberry pi). I was able to connect to my instance via the Nextcloud android app. Here is the error from the log:

2022-06-10 09:32:28 101 [HttpClient] → PROPFIND http:///.well-known/caldav http/1.1
2022-06-10 09:32:28 101 [HttpClient] Depth: 0
2022-06-10 09:32:28 101 [HttpClient] User-Agent: DAVx5/4.2.1-ose (2022/05/08; dav4jvm; okhttp/4.9.3) Android/12
2022-06-10 09:32:28 101 [HttpClient] Accept-Language: en-US, en;q=0.7, *;q=0.5
2022-06-10 09:32:28 101 [HttpClient] Content-Type: application/xml; charset=utf-8
2022-06-10 09:32:28 101 [HttpClient] Content-Length: 198
2022-06-10 09:32:28 101 [HttpClient] Host:
2022-06-10 09:32:28 101 [HttpClient] Connection: Keep-Alive
2022-06-10 09:32:28 101 [HttpClient] Accept-Encoding: gzip
2022-06-10 09:32:28 101 [HttpClient]
2022-06-10 09:32:28 101 [HttpClient] <?xml version='1.0' encoding='UTF-8' ?>
2022-06-10 09:32:28 101 [HttpClient] → END PROPFIND (198-byte body)
2022-06-10 09:32:28 101 [HttpClient] ← 405 Method Not Allowed http:///.well-known/caldav (3ms)
2022-06-10 09:32:28 101 [HttpClient] Date: Fri, 10 Jun 2022 13:32:28 GMT
2022-06-10 09:32:28 101 [HttpClient] Server: Apache/2.4.53 (Raspbian)
2022-06-10 09:32:28 101 [HttpClient] Allow: GET,POST,OPTIONS,HEAD
2022-06-10 09:32:28 101 [HttpClient] Content-Length: 306
2022-06-10 09:32:28 101 [HttpClient] Keep-Alive: timeout=5, max=97
2022-06-10 09:32:28 101 [HttpClient] Connection: Keep-Alive
2022-06-10 09:32:28 101 [HttpClient] Content-Type: text/html; charset=iso-8859-1
2022-06-10 09:32:28 101 [HttpClient]
2022-06-10 09:32:28 101 [HttpClient]

405 Method Not Allowed

Method Not Allowed

The requested method PROPFIND is not allowed for this URL.


Apache/2.4.53 (Raspbian) Server at Port 80

2022-06-10 09:32:28 101 [HttpClient] ← END HTTP (306-byte body)
2022-06-10 09:32:28 101 [ui.setup.DavResourceFinder] Well-known URL detection failed
EXCEPTION at.bitfire.dav4jvm.exception.HttpException: HTTP 405 Method Not Allowed
at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:5)
at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:3)
at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:2)
at at.bitfire.dav4jvm.DavResource.propfind(DavResource.kt:11)
at at.bitfire.davdroid.ui.setup.DavResourceFinder.getCurrentUserPrincipal(DavResourceFinder.kt:2)
at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:26)
at at.bitfire.davdroid.ui.setup.DavResourceFinder.findInitialConfiguration(DavResourceFinder.kt:4)
at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:6)
at at.bitfire.davdroid.ui.setup.DetectConfigurationFragment$DetectConfigurationModel$detectConfiguration$2.invoke(DetectConfigurationFragment.kt:1)
at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:1)

Did you remove the domain part or is this really the url?

Good question. There should have been replacement text in there. There was an IP. Sorry about that.

Is …/.well-known/… set in .htaccess resp. in webserver’s config file?

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/security_setup_warnings.html#your-web-server-is-not-set-up-properly-to-resolve-well-known-caldav-or-well-known-carddav

Here’s how I have it defined:

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} DavClnt
RewriteRule ^$ /remote.php/webdav/ [L,R=302]
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#RewriteRule ^.well-known/carddav /remote.php/dav/ [R=301,L]
#RewriteRule ^.well-known/caldav /remote.php/dav/ [R=301,L]
RewriteRule ^remote/(.) remote.php [QSA,L]
RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.
- [R=404,L]
RewriteRule ^.well-known/(?!acme-challenge|pki-validation) /index.php [QSA,L]
RewriteRule ^(?:.(?!well-known)|autotest|occ|issue|indie|db_|console).* - [R=404,L]

Added by me

RewriteRule ^/.well-known/carddav /var/www/nextcloud/remote.php/dav [R=301,L]
RewriteRule ^/.well-known/caldav /var/www/nextcloud/remote.php/dav [R=301,L]
RewriteRule ^/.well-known/webfinger /var/www/nextcloud/index.php/.well-known/webfinger [R=301,L]
RewriteRule ^/.well-known/nodeinfo /var/www/nextcloud/index.php/.well-known/nodeinfo [R=301,L]

Can anyone please assist me?

My “.well-known” on an Univention server looks like that:

Redirect 301 /.well-known/carddav https://ucs.mydomain.de/nextcloud/remote.php/dav

OK; added that line, did a restart of the apache2 service, and it still fails to find the service.
Here’s what I added: Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
I see there’s another .htaccess file in data. Should I be modifying the one found in the nextcloud folder?
As for .well-known, I did a search for that on my system, and could not locate that folder… How is that created?

In my posting above there ist mentioned the full URI starting with “https://…”

Sorry, I inserted IP in brackets, and it didn’t show up in my post.
I added http://, but it still fails to connect.

Can anyone please assist me?