You may face the below error while accessing applications that have index files other than index.html/index.php or other specified directory indexes.
Apache Error: No matching DirectoryIndex?
Please refer to the following in order to fix the issue.
By default, Apache is configured with the following directory index.
It means that Apache will only look for directory index files that are named index.html. So, whenever we attempt to access phpMyAdmin, Apache throws an error.
In order to resolve this issue, we will need to add index.php file as a DirectoryIndex.
- Run the command.
- Above command will open the configure file and we will need to add below line in the configuration file.
DirectoryIndex index.html index.php
Once you add “index.php” in the configuration file, exit from the editor and save the file. Please note that we have changed configuration files so we will need to restart the Apache service. For that follow below command:
systemctl restart httpd
Your error should have gone now. So, this is how you can resolve the DirectoryIndex error.