Do you have this at the appropriate place?
<IfModule dir_module>
DirectoryIndex index.php index.shtml index.sht index.html index.htm
</IfModule>
Is the module loaded?
If the URI points to an directory, Apache will try to append an index file.
- It will walk the list in
DirectoryIndex
and use the first file that exists.
- If not Apache will show the content of the folder (if allowed) or send an HTTP status code 403.
DirectoryIndex
can be set globaly in httpd.conf
and additionally in the <VirtualHost ... >
container for the individual virtual host.
Does your shown "plain text" contain PHP script code?
As your answer is "Yes":
Your problem is that PHP is not interpreting the code.
Is PHP installed? – What's the result of this command?
php -v
As in the past php has worked I would suggest also to reinstall php:
yum reinstall php php-cli
.... plus possibly some extras that nextcloud might require.