Tuesday, January 5, 2021

How do I disable directory listing in server



Step1: login to the server as root user then goto below path and open the apache2.conf

/etc/apache2/apache2.conf

change from

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

to

<Directory /var/www/>
        Options FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>
The press the keys => esc:wq for update then restart the server
service apache2 restart


No comments:

Post a Comment