External Storage (WebDAV) no https

Nextcloud version (eg, 18.0.2): 19.0.3
Operating system and version (eg, Ubuntu 20.04): Synology DSM 6.2
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4
PHP version (eg, 7.1): 7.3

My Nextcloud Instance is available under mycloud.mydomain.com as a vHost.
I have added some folders on the same server as external storage via WebDAV.
If I use the same URL, Nextcloud uses, http is fine (mycloud.mydomain.com:5005) but if I use https (mycloud.mydomain.com:5006) and activate the https option, the external storage turns red.
If I change the URL to some other subdomain that point to the server (myserver.mydomain.com) https works fine.

Is https not working because it is the same host?
Is there an issue?
Is it save to use http as the folder is on the same server?
If I use https and a different URL are requests between NC and the shared storage handled directly on the server or are the goinig through the router?

If I use the same URL and https, the log just says the mount ID X is not available but no additional error message.

Hi Thor,
I have exactly the same issue now. Impossible to activate the https option but it works in http. Have you been able to solve it? What was the issue?
Many thanks!

Hi, yes I was able to solve it.
I’m not entirely sure about the solution anymore but I think the issue was the SSL-Certificate. The wrong certificate was used on WebDAV side.

I have a certificate for the NC-Domain (only requested for that domain). The WebDAV is running on the DiskStation directly. So I requested another certificate for a domain that I use for the DIskStation, this certificate is configured as default certificate.
I entered that domain as WebDAV URL in NCs external storage and https was working.

Assigning the same certificate you use for NC to the WebDAV server should also work.

Another possible issue: the domain can’t be resolved locally. If you reach WebDAV only via entering the IP address and not via domain, you router prevents resolving domains to local IPs. Either you can change that on your router or you can set up a local DNS resolving you domains.