I have 3 vhosts on a server, I want one of them to have directory listing enabled. This is the configuration file for it:
<VirtualHost *:80>
ServerName me
ServerAdmin me
DocumentRoot /var/www/test.host.net
<Directory "/var/www/test.host.net">
Options All +Indexes
AllowOverride all
</Directory>
#<Directory /var/www/>
# Options +Indexes FollowSymLinks MultiViews
# AllowOverride all
# Order allow,deny
# allow from all
#</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AddHandler cgi-script .cgi
Order deny,allow
Deny from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/errors_from_this_host.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
CustomLog ${APACHE_LOG_DIR}/access_to_this_host.log combined
</VirtualHost>
The file does have directory handling for /var/www/ but since it's commented out I believe it is disabled.
I have an .htaccess file in /var/www/test.host.net with Options +Indexes just in case.
Error log:
[error] [client dumb] Directory index forbidden by Options directive: /var/www/test.host.net/
Issue is occurring on Debian 7 Apache 2.2
All suggestions welcome.
All
do on theOptions
line?Mixing Options with a + or - with those without is not valid syntax and will be rejected during server startup by the syntax check with an abort.
Options All +Indexes
; maybe split it into two linesOptions All
andOptions +Indexes
.Mixing Options with a + or - with those without is not valid syntax and is likely to cause unexpected results.
And further, it looks like All includes Indexes, so you don't need that one.