Apache’s “Cannot Serve Directory… No matching DirectoryIndex”

Edit /etc/apache2/mods-enabled/dir.conf and add index.php (or your actual directory index file).

This should fix an error like:

AH01276: Cannot serve directory /var/www/dir: 
No matching DirectoryIndex (index.html,index.cgi,index.pl,index.xhtml,index.htm) found, 
and server-generated directory index forbidden by Options directive

Leave a Reply

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