Apache Error: No matching DirectoryIndex (index.html) found [SOLVED]

Apache Error for One General Reason


This error may occur when attempting to access applications that have an index.php file (or other index file), but not an index.html or other specified ‘directory index’ file.


For example, phpMyAdmin includes an index.php file upon installation, but not an index.html file.


By default Apache is configured with the following:

<IfModule dir_module>
DirectoryIndex index.html
</IfModule>


…meaning that Apache will only look for directory index files that are named index.html.


So, when attempting to access phpMyAdmin, Apache throws the following error:

[autoindex:error] [pid 20115] [client 10.30.6.80:50800] 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 we want to add index.php to the DirectoryIndex directive.

vim /etc/httpd/conf/httpd.conf


Change:

<IfModule dir_module>
DirectoryIndex index.html
</IfModule>


to:

<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
Then exit and save the file with the command :wq .


Be sure to restart Apache:

systemctl restart httpd

  • 71 Users Found This Useful
Was this answer helpful?

Related Articles

How to Install and Configure ProFTPD on Ubuntu 14.04 LTS

Step 1: Install ProFTPD Warning: FTP data is insecure; traffic is not encrypted, and all...

Error: 500 OOPS: priv_sock_get_cmd [SOLVED]

The Fix This error may occur when attempting to connect to a vsftpd FTP server. You simply need...

How To Install Varnish 4 on CentOS 7

Varnish is a proxy and cache, or HTTP accelerator, designed to improve performance for busy,...

How to Install and Connect to PostgreSQL on CentOS 7

Step 1: Add the PostgreSQL 9.3 Repository In this case we want to install PostgreSQL 9.3...

How To Install Apache Tomcat 7 on Ubuntu 14.04

Step 1a: Install Tomcat with apt-get Easy… just one command! apt-get install tomcat7...

Powered by WHMCompleteSolution