My server provides WebDAV over HTTPS only, so that other machines can access the DAV. Say the certificate is issued for www.myserver.com and the WebDAV is at https://www.myserver.com/webdav.
For various reasons, I also want the server itself to mount this directory. Since there's no point using the actual URL and routing over the whole internet, I just take a shortcut:
mount https://localhost/webdav
But now I get a problem:
/sbin/mount.davfs: the server certificate does not match the server name
Which makes sense. As explained by the developer of davfs, the certificate I got is for www.myserver.com but it is presented by 127.0.0.1, so of course it doesn't match.
I want to auto-mount this volume at boot. Presumably that wouldn't work, since at every boot it would wait for someone to answer Y/N to accepting the certificate. How can I make davfs ignore this problem either for this URL or for this certificate?