У меня есть виртуальный хост с такой конфигурацией.
Когда я пытаюсь войти в 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
Добавить Options +Indexes
напоследок <Directory>
заявление