Locate config.php:
find / -type f -name "config.php"
Add this to your config.php:
'htaccess.RewriteBase' => '/'
(Path depends on your configuration - maybe /nextcloud)
Update htaccess with the occ command:
sudo -u apache php occ maintenance:update:htaccess
Make sure all modules are enabled with
cat /etc/httpd/conf.modules.d/* | grep mod_env
and
cat /etc/httpd/conf.modules.d/* | grep mod_rewrite
The output line should not start with #
I also restarted my httpd
systemctl restart httpd