The correct way to disable directory index is doing the following in a .htaccess file
.htaccess
Options -Indexes
try this Options -Indexes in .htaccess,