bch
Member
- bch was last seen:
- Nov 8, 2022
- Loading...
- Loading...
-
About
My Tips & Tricks
1) Disable Apache 2.4 Directory Listings
In Apache 2.4 (on Debian 8), directory listings, also called indexes, are enabled by default. That means that if a folder does not contain a index file, Apache will expose the files and folders of that directory when accessed. This tip shows how disable this behaviour by default on all websites created with ISPConfig, while still give clients the possibility to enable it.
ISPConfig administrators can use the Apache Directives field to do this pr. site like this:
Code:<Directory /var/www/clients/client1/web1/web> Options -Indexes </Directory>
(and by the way I have not been able to use the DOCROOT variable (symlink) in this context).
Instead, we create a Apache config file:
Code:vi /etc/apache2/conf-available/custom.conf
Code:<Directory /var/www/clients/client*/web*/web> Options -Indexes </Directory>
Code:a2enconf custom
Code:a2disconf custom
Code:service apache2 reload
Code:Options +Indexes
Interact