If your web server is apache, when you open a directory by your browser, you may get a list of directories or files. Here is an example:
This is not safe to your site. In this tutorial, we will introduce how to make apache does not display directories and files.
Create or open a .htaccess file in your site root path
You can add code below at the end of this file.
Options All -Indexes
Then save this file.
You can find apache will not display display directories and files. This problem is fixed.