How to disable your directory listing in Apache via Cpanel Website Hosting
Prevent the users to access the directory to view the list of files
You need Cpanel website hosting account to disable the visibility of directories and files. There are two options that you can prevent the unauthorised users from browsing the directory and files.
1. In Cpanel, type 'Indexes' in a search box or go to advanced section and click Indexes icon.
2. Choose the folders that you wish to protect it.
1. Click File Manager icon and find your main folder that it contains the HTML and other files.
2. Find '.htaccess' file and open it.
3. Type 'Options -Indexes' and save the file.
You can learn more about Apache, visit http://httpd.apache.org.