Can't set the data directory to a mounted directory

If the command sudo chown -R www-data:www-data /var/nextcloud_data (nginx, don’t know the webuser for Apache) doesn’t help, then you can try this post:

What means the error.log of your web server?