Sunday, 26 November 2023

Apache disable directory browsing && docker

 disble directory borwsing so mysite/a mysite/b wont be allowed

https://stackoverflow.com/questions/2530372/how-do-i-disable-directory-browsing

The best way to do this is disable it with webserver apache2. In my Ubuntu 14.X - open /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>
in docker its httpd container,
its in httpd/httpd.conf
check document root 

DocumentRoot "/usr/local/apache2/htdocs"
<Directory "/usr/local/apache2/htdocs">


No comments:

Post a Comment