Can't sync contacts to iPhone

Following the documentation at https://docs.nextcloud.com/server/latest/user_manual/en/groupware/sync_ios.html?highlight=calendar#synchronizing-with-ios . I get the error “Cannot connect using SSL”. It fails whether I select Continue (to try without SSL) or not.

I have no trouble accessing Nextcloud’s CardDAV interface with Thunderbird on Windows.

I’m running Nextcloud 23.0.4 (Docker build) behind an nginx reverse proxy with a letsencrypt cert. My nginx config currently includes the following:

	location ^~ /.well-known {
		location = /.well-known/carddav { return 301 /remote.php/dav/; }
		location = /.well-known/caldav  { return 301 /remote.php/dav/; }
		location /.well-known/acme-challenge    { try_files $uri $uri/ =404; }
		location /.well-known/pki-validation    { try_files $uri $uri/ =404; }
	return 301 /index.php$request_uri;
	}

I’ve tried it with and without that snippet, to no avail.