小弟刚刚学配置apache2.2.4的服务噐,在设定.htaccess文件的时候,浏览网页时提示输入用户名和密码,但我怎么输入都不对,各位大哥帮看看可能是哪里的问题:
httpd.conf的配置:
Alias /test "/home/test/public_html"
<Directory "/home/test/public_html">
#Options Indexes FollowSymLinks
Options FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
userdir.conf里面的内容是:
<IfModule mod_userdir.c>
UserDir public_html
UserDir disabled root
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
</IfModule>
/home/test/public_html目录下的.htaccess文件内容:
AuthName "Protect test by .htaccess"
AuthType Basic
AuthUserFile /var/www/apache.passwd
Require testadmin admin admin2
/var/www/apache.passwd文件的内容:
testadmin:UvHffvMiR.7qw
admin:Z7DWFBZmV94Gk
admin2:4QSv63FMV8sdc
在error.log文件中有:
access to /test/index.html failed, reason: require directives present and no Authoritative handler.
当浏览http://localhost/test时,会弹出输入用户名和密码,但怎么输都不对,可能是哪里的问题?
[问题]apache2 的.htaccess认证问题
-
- 帖子: 11
- 注册时间: 2007-04-26 23:12