Monday, August 22, 2016

How to prevent directory listing in Apache 2

If you are using Apache 2 as a web server on Linux, you might have seen that directory listing is enabled by default.

Directory listing allows anyone to view all the files and subfolders contained in a specific folder, by entering the URL on the browser. The image below is an example of the directory listing that you could see when you visit the fictitious URL www.example.com/images.



This might affect some privacy protection rules. In order to disable directory listing, you just need to type the following command from the terminal:

sudo a2dismod autoindex

1 comment:

  1. nice post! I really like and appreciate your work, thank you for sharing such a useful information about human resource kickstarter management concepts, keep updating the information, hear i prefer some more information about jobs for your career hr jobs in hyderabad .

    ReplyDelete