If you have a website built using PHP and hosted on an Apache2 server, you should perform one quick security check to know if your subdirectories are getting listed or not.
For e.g. if you have a website url such as
www.website.com/folder1/folder2/file.html
Then you can try accessing the sub URL such as
www.website.com/folder1/
If your website is displaying the list of files present inside the browser, then it’s an issue.
Though the user cannot access your codes in PHP as those are server side rendered, however, exposing sub-directory listing of your website may sometimes encourage security vulnerability. Hence, it becomes important to prevent such kind of sub-directory listing of your website.
This can be done by following these steps:
Let me know if it was helpful, do spread the word by sharing this article…
Fully customizable CRM Software for Freelancers and Small Businesses