All seemed to be working OK but I did have lots of annoying entries in apache error.log.
[access_compat:error] [pid 74888:tid 140282574116416] [client a.b.c.d:0] AH01797: client denied by server configuration: /var/www/nextcloud/index.php
etc. etc. etc.
Ubuntu 22.04.1 LTS (Jammy Jellyfish)
Nextcloud 24.0.4 installed using GitHub - nextcloud/vm: 💻☁📦 The Nextcloud VM (virtual machine appliance), Home/SME Server and scripts for RPi (4). Community developed and maintained.
Issue resolved by updated /var/www/nextcloud/config/.htaccess and /mnt/ncdata/.htaccess
Maybe <IfModule mod_access_compat.c> should be like <IfModule mod_authz_core.c> in # Section for Apache 2.4 to 2.6 in server/.htaccess at master · nextcloud/server · GitHub
Anyhow, this is what I did and no more annoying entries in apache error.log