how can I define apache virtual host to show a directory tree even if index.html/php exists?
You have to enabled the Indexes
option and remove the DirectoryIndex
option.
If you have AllowOverride
enabled you can add the following to your .htaccess file.
Options Indexes FollowSymLinks
DirectoryIndex disabled
If you get a welcome page, you may need to remove/edit /etc/httpd/conf.d/welcome.conf
. ON Red Hat derived OS's and others this can interfere with some directory listing.