Don Zauker's picture

Hello,

how to disable directory listing in Turnkey Apache server ?

httpd.conf in /etc/apache2 is empty so I have no idea how to fix.

There's a way to disable listing using webmin interface ?

 

EDIT

 

I did some modify in 

APACHE WEBSERVER -> VIRTUAL SERVER OPTIONS -> DIRECTORY INDEXING

I have put * wildcard in 

Files to ignore in directory index

This is the directive resultant

 

DocumentRoot /var/www/webapp
ServerName webapp.local.com
<Directory "/var/www/webapp">
allow from all
Options -Indexes
</Directory>
IndexOptions 
IndexIgnore *
 
I have rebooted the server but the folders are still browsable.
Forum: 
Don Zauker's picture

Ok, found...

remove Idexes from /etc/apache2/sites-available/default

Jeremy Davis's picture

For future reference Apache config is layed out a little different in Debian (and Ubuntu etc) than it is as per Apache documentation (and RHEL based distros). Whilst httpd.conf is still passed, Apache conf is broken up into separate files in Debian (which personally I think makes it make easier to work with...).

The conf files are all still in /etc/apache2 but they are (OTTOMH):

  • apache2.conf - main Apache conf file
  • ports.conf - the file where ports are defined
  • sites-available - contains all the conf files for indivdual virtual hosts
  • sites-enabled - contains symlinks to files in sites-available for sites that are enabled (enable and disable is done via commands: a2ensite <site-filename> & a2dissite <site-filename> respectively

Add new comment