Ich hatte das Problem das nach dem Update bzw. Upgrade von Nextcloud 16 auf Nextcloud 17 (über den Web-Updater) meine Nextcloud nicht mehr erreichbar war und
HTTP ERROR 500
ausgab.
Lösen konnte ich das Problem über die Shell (der Pfad ist euer Nextcloud-Verzeichnis):
cd /var/www/nextcloud
sudo -u www-data php occ upgrade
Danach lief wieder alles 🙂

Quelle: https://help.nextcloud.com/t/http-error-500-after-update-to-nc-13/27001/3