apache2 Error 500 after AllowOverride All

Hello,

so i installed nextcloud on a vm with unbuntu 20, everything looked fine so far. I could visit the site so i thought i take a look at the settings and i found this error: “Your data directory and your files are probably accessible from the internet…” So i googled a bit and found this solution: i should change AllowOverride None to AllowOverride All in the apache2.conf. I’ve done that but after that i get an error 500 and can’t visit the nextcloud webpage anymore. When i change this back it works again.

The apache2 error log says this: [Mon Mar 08 15:43:25.373589 2021] [core:alert] [pid 43919] [client x.x.x.x:xxxx] /var/www/nextcloud/.htaccess: php_value takes two arguments, PHP Value Modifier

I already googled that a little bit but could not find a solution so far.

a2enmod rewrite is active The .htaccess is located /var/www/nextcloud

Would be glad if someone could maybe help.

Thanks in advance and sorry for my bad english.