How can I disable directory indexing by apache ?
It is unsafe.
I’ve added an .htaccess file “Options -Indexes” in the directory but it not work.
I’ve edited the conf.d and removed the Options -Indexes…
I’ve restarted apache many times but still indexig the root.
There are many conf file to edit ?
Which httpd.conf file are you modifying? There is the “standard” one for apache and then their is NethServer’s httpd.conf file located in /etc/httpd/admin-conf. Line 184 at the bottom of the config shows ‘Options +Indexes’.
<Directory /var/lib/nethserver/winregistry-patches/>
Options +Indexes
Order Allow,Deny
Allow from all
</Directory>
Include conf.d/php.conf
This file is also generated from templates which you would also have to update. Any changes made to NethServer (not sure which ones explicitly) will revert the changes you made to the config file. The templates for this config file is located at ‘/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf’; and there are two files that you need to update named ‘60NethServerManager’ and ‘60winregistry_patches’.