Internal server error while setting up Nextcloud

Hello, i downloaded the nextcloud zip and the folder nextcloud is now in /var/www/.

Information:
System/Model: Raspberry Pi 4
OS: Latest Raspberry Pi OS (Raspbian)
Updates: All new ones installed
Nextcloud web server: Apache2
PHP version: 7.3
Nextcloud language (default because i changed the RPi lang): de-DE (German - Germany)

/var/log/apache2/error.log:
[Mon Mar 29 12:48:18.314322 2021] [php7:notice] [pid 8157] [client 192.168.178.32:57082] {“reqId”:“h1u8WfI6BMCecc7qsQ9i”,“level”:3,“time”:“2021-03-29T10:48:18+00:00”,“remoteAddr”:“192.168.178.32”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"/",“message”:{“Exception”:“Error”,“Message”:“touch(): Unable to create file /var/www/nextcloud/config/config.php because Keine Berechtigung at /var/www/nextcloud/lib/private/Config.php#247”,“Code”:0,“Trace”:[{“function”:“onError”,“class”:“OC\\Log\\ErrorHandler”,“type”:"::",“args”:[2,“touch(): Unable to create file /var/www/nextcloud/config/config.php because Keine Berechtigung”,"/var/www/nextcloud/lib/private/Config.php",247,{“content”:"<?php\n$CONFIG = array (\n ‘instanceid’ => ‘ocu7neg805gz’,\n);\n"}]},{“file”:"/var/www/nextcloud/lib/private/Config.php",“line”:247,“function”:“touch”,“args”:["/var/www/nextcloud/config/config.php"]},{“file”:"/var/www/nextcloud/lib/private/Config.php",“line”:137,“function”:“writeData”,“class”:“OC\\Config”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/lib/private/SystemConfig.php",“line”:111,“function”:“setValue”,“class”:“OC\\Config”,“type”:"->",“args”:[“instanceid”,“ocu7neg805gz”]},{“file”:"/var/www/nextcloud/lib/private/legacy/OC_Util.php",“line”:1173,“function”:“setValue”,“class”:“OC\\SystemConfig”,“type”:"->",“args”:[“instanceid”,“ocu7neg805gz”]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:413,“function”:“getInstanceId”,“class”:“OC_Util”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:639,“function”:“initSession”,“class”:“OC”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:1076,“function”:“init”,“class”:“OC”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/index.php",“line”:35,“args”:["/var/www/nextcloud/lib/base.php"],“function”:“require_once”}],“File”:"/var/www/nextcloud/lib/private/Log/ErrorHandler.php",“Line”:92,“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0”,“version”:""}
[Mon Mar 29 12:48:18.314882 2021] [php7:notice] [pid 8157] [client 192.168.178.32:57082] {“reqId”:“h1u8WfI6BMCecc7qsQ9i”,“level”:3,“time”:“2021-03-29T10:48:18+00:00”,“remoteAddr”:“192.168.178.32”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"/",“message”:{“Exception”:“Error”,“Message”:“fopen(/var/www/nextcloud/config/config.php): failed to open stream: Datei oder Verzeichnis nicht gefunden at /var/www/nextcloud/lib/private/Config.php#248”,“Code”:0,“Trace”:[{“function”:“onError”,“class”:“OC\\Log\\ErrorHandler”,“type”:"::",“args”:[2,“fopen(/var/www/nextcloud/config/config.php): failed to open stream: Datei oder Verzeichnis nicht gefunden”,"/var/www/nextcloud/lib/private/Config.php",248,{“content”:"<?php\n$CONFIG = array (\n ‘instanceid’ => ‘ocu7neg805gz’,\n);\n"}]},{“file”:"/var/www/nextcloud/lib/private/Config.php",“line”:248,“function”:“fopen”,“args”:["/var/www/nextcloud/config/config.php",“r+”]},{“file”:"/var/www/nextcloud/lib/private/Config.php",“line”:137,“function”:“writeData”,“class”:“OC\\Config”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/lib/private/SystemConfig.php",“line”:111,“function”:“setValue”,“class”:“OC\\Config”,“type”:"->",“args”:[“instanceid”,“ocu7neg805gz”]},{“file”:"/var/www/nextcloud/lib/private/legacy/OC_Util.php",“line”:1173,“function”:“setValue”,“class”:“OC\\SystemConfig”,“type”:"->",“args”:[“instanceid”,“ocu7neg805gz”]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:413,“function”:“getInstanceId”,“class”:“OC_Util”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:639,“function”:“initSession”,“class”:“OC”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:1076,“function”:“init”,“class”:“OC”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/index.php",“line”:35,“args”:["/var/www/nextcloud/lib/base.php"],“function”:“require_once”}],“File”:"/var/www/nextcloud/lib/private/Log/ErrorHandler.php",“Line”:92,“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0”,“version”:""}
[Mon Mar 29 12:48:18.315302 2021] [php7:notice] [pid 8157] [client 192.168.178.32:57082] {“reqId”:“h1u8WfI6BMCecc7qsQ9i”,“level”:3,“time”:“2021-03-29T10:48:18+00:00”,“remoteAddr”:“192.168.178.32”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"/",“message”:{“Exception”:“Error”,“Message”:“chmod(): Datei oder Verzeichnis nicht gefunden at /var/www/nextcloud/lib/private/Config.php#251”,“Code”:0,“Trace”:[{“function”:“onError”,“class”:“OC\\Log\\ErrorHandler”,“type”:"::",“args”:[2,“chmod(): Datei oder Verzeichnis nicht gefunden”,"/var/www/nextcloud/lib/private/Config.php",251,{“content”:"<?php\n$CONFIG = array (\n ‘instanceid’ => ‘ocu7neg805gz’,\n);\n",“filePointer”:false}]},{“file”:"/var/www/nextcloud/lib/private/Config.php",“line”:251,“function”:“chmod”,“args”:["/var/www/nextcloud/config/config.php",416]},{“file”:"/var/www/nextcloud/lib/private/Config.php",“line”:137,“function”:“writeData”,“class”:“OC\\Config”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/lib/private/SystemConfig.php",“line”:111,“function”:“setValue”,“class”:“OC\\Config”,“type”:"->",“args”:[“instanceid”,“ocu7neg805gz”]},{“file”:"/var/www/nextcloud/lib/private/legacy/OC_Util.php",“line”:1173,“function”:“setValue”,“class”:“OC\\SystemConfig”,“type”:"->",“args”:[“instanceid”,“ocu7neg805gz”]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:413,“function”:“getInstanceId”,“class”:“OC_Util”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:639,“function”:“initSession”,“class”:“OC”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:1076,“function”:“init”,“class”:“OC”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/index.php",“line”:35,“args”:["/var/www/nextcloud/lib/base.php"],“function”:“require_once”}],“File”:"/var/www/nextcloud/lib/private/Log/ErrorHandler.php",“Line”:92,“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0”,“version”:""}
[Mon Mar 29 12:48:18.408094 2021] [php7:notice] [pid 8157] [client 192.168.178.32:57082] {“reqId”:“h1u8WfI6BMCecc7qsQ9i”,“level”:3,“time”:“2021-03-29T10:48:18+00:00”,“remoteAddr”:“192.168.178.32”,“user”:"–",“app”:“index”,“method”:“GET”,“url”:"/",“message”:{“Exception”:“OC\\HintException”,“Message”:“Can’t write into config directory!”,“Code”:0,“Trace”:[{“file”:"/var/www/nextcloud/lib/private/Config.php",“line”:137,“function”:“writeData”,“class”:“OC\\Config”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/lib/private/SystemConfig.php",“line”:111,“function”:“setValue”,“class”:“OC\\Config”,“type”:"->",“args”:[“instanceid”,“ocu7neg805gz”]},{“file”:"/var/www/nextcloud/lib/private/legacy/OC_Util.php",“line”:1173,“function”:“setValue”,“class”:“OC\\SystemConfig”,“type”:"->",“args”:[“instanceid”,“ocu7neg805gz”]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:413,“function”:“getInstanceId”,“class”:“OC_Util”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:639,“function”:“initSession”,“class”:“OC”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/lib/base.php",“line”:1076,“function”:“init”,“class”:“OC”,“type”:"::",“args”:[]},{“file”:"/var/www/nextcloud/index.php",“line”:35,“args”:["/var/www/nextcloud/lib/base.php"],“function”:“require_once”}],“File”:"/var/www/nextcloud/lib/private/Config.php",“Line”:255,“Hint”:“This can usually be fixed by giving the webserver write access to the config directory.”,“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0”,“version”:""}
[Mon Mar 29 12:48:18.408583 2021] [php7:notice] [pid 8157] [client 192.168.178.32:57082] {“reqId”:“h1u8WfI6BMCecc7qsQ9i”,“level”:3,“time”:“2021-03-29T10:48:18+00:00”,“remoteAddr”:“192.168.178.32”,“user”:"–",“app”:“index”,“method”:“GET”,“url”:"/",“message”:{“Exception”:“Doctrine\\DBAL\\Exception”,“Message”:“Failed to connect to the database: An exception occurred in the driver: could not find driver”,“Code”:0,“Trace”:[{“file”:"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",“line”:1486,“function”:“connect”,“class”:“OC\\DB\\Connection”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",“line”:1014,“function”:“getWrappedConnection”,“class”:“Doctrine\\DBAL\\Connection”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/lib/private/DB/Connection.php",“line”:226,“function”:“executeQuery”,“class”:“Doctrine\\DBAL\\Connection”,“type”:"->",“args”:[“SELECT * FROM \“oc_appconfig\””,[],[],null]},{“file”:"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",“line”:210,“function”:“executeQuery”,“class”:“OC\\DB\\Connection”,“type”:"->",“args”:[“SELECT * FROM \“oc_appconfig\””,[],[]]},{“file”:"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",“line”:286,“function”:“execute”,“class”:“Doctrine\\DBAL\\Query\\QueryBuilder”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/lib/private/AppConfig.php",“line”:345,“function”:“execute”,“class”:“OC\\DB\\QueryBuilder\\QueryBuilder”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/lib/private/AppConfig.php",“line”:110,“function”:“loadConfigValues”,“class”:“OC\\AppConfig”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/lib/private/AppConfig.php",“line”:301,“function”:“getApps”,“class”:“OC\\AppConfig”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/lib/private/App/AppManager.php",“line”:136,“function”:“getValues”,“class”:“OC\\AppConfig”,“type”:"->",“args”:[false,“enabled”]},{“file”:"/var/www/nextcloud/lib/private/App/AppManager.php",“line”:225,“function”:“getInstalledAppsValues”,“class”:“OC\\App\\AppManager”,“type”:"->",“args”:[]},{“file”:"/var/www/nextcloud/lib/private/legacy/OC_Template.php",“line”:284,“function”:“isEnabledForUser”,“class”:“OC\\App\\AppManager”,“type”:"->",“args”:[“theming”]},{“file”:"/var/www/nextcloud/index.php",“line”:45,“function”:“printErrorPage”,“class”:“OC_Template”,“type”:"::",“args”:[“Can’t write into config directory!”,“This can usually be fixed by giving the webserver write access to the config directory.”,503]}],“File”:"/var/www/nextcloud/lib/private/DB/Connection.php",“Line”:85,“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0”,“version”:""}
[Mon Mar 29 12:48:18.459096 2021] [php7:notice] [pid 8157] [client 192.168.178.32:57082] {“reqId”:“h1u8WfI6BMCecc7qsQ9i”,“level”:3,“time”:“2021-03-29T10:48:18+00:00”,“remoteAddr”:“192.168.178.32”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"/",“message”:“fopen(/var/www/nextcloud/data/nextcloud.log): failed to open stream: Datei oder Verzeichnis nicht gefunden at /var/www/nextcloud/lib/private/Log/File.php#85”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0”,“version”:""}

Web information:
192.168.178.32
18cJ8bMpqeznpbZFCGGv

The nextcloud server is running on port 80

/etc/apache2/sites-available/nextcloud.conf:
Listen 80

<VirtualHost *:80>
ServerAdmin foo@bar.com (mail removed)
DocumentRoot /var/www/nextcloud
ServerName 192.168.178.26
<Directory /var/www/nextcloud>
Require all granted
Satisfy Any
AllowOverride All
Options FollowSymLinks MultiViews

Dav off



<VirtualHost *:80>
ServerAdmin foo@bar.com (mail removed)
DocumentRoot /var/www/nextcloud
ServerName raspberrypi
<Directory /var/www/nextcloud>
Require all granted
Satisfy Any
AllowOverride All
Options FollowSymLinks MultiViews

Dav off



<VirtualHost *:80>
ServerAdmin foo@bar.com (mail removed)
DocumentRoot /var/www/nextcloud
ServerName pi.hole
<Directory /var/www/nextcloud>
Require all granted
Satisfy Any
AllowOverride All
Options FollowSymLinks MultiViews

Dav off


(Yes, i have a Pihole on this thing but on port 82)

In advance, thank you!
If you need more data, i can probably provide it.

Solved. I just forgot to change the right from root:root to www-data:www-data.