How to fix - Apache Error: No matching DirectoryIndex?
							
						
					Apache Error: No matching DirectoryIndex
				
					Collapse
				
			
		
	Unconfigured Ad Widget
				
					Collapse
				
			
		
	X
- 
	
	
	
		
	
	
	
	
	
Hello Delaney martin,
If you're facing the below Apache Error: "No matching DirectoryIndex" while accessing applications with index files other than index.html/index.php or other specified directory indexes. However, you can follow the below steps to fix the issue.
By default, Apache is configured with the following directory index.
Code:<IfModule dir_module> DirectoryIndex index.html </IfModule>
It means that Apache will only find directory index files that are named index.html. So, whenever we try to access phpMyAdmin, Apache gives a "No matching DirectoryIndex" error.
In order to resolve this issue, we'll need to add the index.php file as a DirectoryIndex.- Firstly, run the following command to open the configure file,
 
Code:[SIZE=18px]vim /etc/httpd/conf/httpd.conf[/SIZE]
- Next, add the below line in the configuration file,
 
From
ToCode:<IfModule dir_module> DirectoryIndex index.html </IfModule>
Code:<IfModule dir_module> DirectoryIndex index.html index.php </IfModule>
Now, after adding "index.php" to the configuration file, exit from the editor.
Lastly, save the file to confirm changes.
Note: You'll have to restart the Apache service because of changes made in the configuration files.- You can use the following command to restart the Apache service,
 
Code:systemctl restart httpd
Thus, I hope the ways mentioned above help you resolve the "No matching DirectoryIndex" error.
----------------------
Regards,
Rex Maughan
 

Comment