Easy Way to Disable Directory Listing on Apache2 - Ubuntu Server

Опубликовано: 06 Октябрь 2024
на канале: Sk 21
940
13

How to disable directory listing on the Apache2 web server using the Linux operating system.

Directory listing allows your website visitors to get a complete list of all files and folders on your site. The browser will display all the contents of the directory if you do not create an "index.html" file in that directory.

So that directory listing is not visible to clients, we have to disable it manually on the server operating system. The method is as follows:

1. Update repository (apt-get update)
2. Disable the auto index module (a2dismod –force autoindex)

Required equipment:
Virtualbox
VM Ubuntu Server 20.04 (for all Linux OS the steps are almost the same)
Remote SSH (Termius)

Web Server Protection Playlist:
   • Web Server  

Social media :
Instagram :   / sk21.ig  
Twitter :   / sanikari21  
Blog : https://sanikari.blogspot.com/