Apache目录访问与虚拟主机

我有一个像这样的configuration的虚拟主机

当我试图进入foobar.com/dir提供有效的用户名/密码对,我得到403禁止的页面,而不是该目录的内容。

www.foobar.com/dir有777个权利,.httpaswd是chmoded 644.但我不明白为什么我还没有看到内容。 请给我一个提示。

ServerAdmin webmaster@localhost ServerName www.foobar.com ServerAlias www.foobar.com DocumentRoot /var/www/foobar <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /var/www/foobar> Options -Indexes FollowSymLinks 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 Order allow,deny Allow from all </Directory> <Directory /var/www/foobar/dir> AllowOverride AuthConfig AuthName "Authorize yourself, please!" AuthType Basic AuthUserFile /etc/apache2/.htpasswd AuthGroupFile /dev/null Allow from All Order Allow,Deny Options +Indexes<<- that one should be added Require valid-user 

在最后一个<Directory>语句中添加Options +Indexes