Single Blog

How to Resolve the Apache Error: No matching DirectoryIndex?

June 25, 2020, Written by 0 comment

For this tutorial, you need to have root access and so, this can be done only on VPS, Dedicated, and Cloud.

You might face this error while attempting to access applications that have an index.php file (or other index files), but not an index.html or other specified ‘directory index’ file.

For example, phpMyAdmin comprises of index.php file after installation, but not an index.html file.

Apache is by default configured with the below command:

It means that Apache will only check for the directory files that are named index.html.

While trying to access phpMyAdmin, Apache gives the below error:

[autoindex:error] [pid 20115] [client] AH01276: Cannot serve directory /usr/share/phpMyAdmin/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive

In this case, add index.php to the DirectoryIndex directive.

Change the below line:


Now exit and save the file using the command:wq .

Ensure to restart Apache:

Congratulations! You have now learned to solve the Apache Error: No matching DirectoryIndex.


Leave a reply

Your email address will not be published. Required fields are marked *