Saturday, June 13, 2020

Solve AH01276: Cannot serve directory No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive


I get the following error in error.logs:

[Sat Jun 13 13:20:28.420637 2020] [autoindex:error] [pid 23018] [client 44.224.22.196:40224] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive

To quickly solve it, make sure DocumentRoot points to a valid folder where index.php or index.html is found:

vi /etc/httpd/conf/httpd.conf
Replace:
DocumentRoot "/var/www/html"

With:
DocumentRoot "/var/www/html/easybiny/prod"

No comments:

Post a Comment