AH01276: Cannot serve directory /home/username/public_html/wp-includes/: No matching DirectoryIndex

OS type and version Ubuntu Linux 22.04.2
Virtualmin version 7.5


I found that under Apache error log:

[autoindex:error] [pid 66091:tid 140223367247424] [client] AH01276: Cannot serve directory /home/username/public_html/wp-includes/: No matching DirectoryIndex (index.php,index.php4,index.php5,index.htm,index.html) found, and server-generated directory index forbidden by Options directive

where the mentioned IP is from my hosting provider Hetzner.

May you help to troubleshoot?

Thank you in adavance.

I don’t use WP but I would not want anything served from an include folder, With the coding I do I never allow access to this type of folder period … And as the directory name suggests there files are included in other files

This error is telling you that someone (maybe a crawler from your hosting provider) tried to access that folder by it’s url and the web server could not find a valid index file to show. Just put an empty index.php in that folder, that will get you rid from that message and prevent any unwanted visitors to list the contents in case you have directory listing enabled. In fact, consider it a good practice putting empty index files in all your sensitive folders, specially with WP

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.