这个是 .htaccess的内容
AuthUserFile /apachepasswd/passwd
AuthGroupFile /dev/null/
AuthName "My secret directory"
AuthType Basic
Require valid-user
在根目录下也创建了apachepasswd的文件夹,有htpasswd创建了用户,设置成明文,所以输密码用户的时候绝对是没错的
[root@localhost acltest]# cat /apachepasswd/passwd
web:1
以下是httpd.conf文件改的内容
Alias /acltest "/acltest/"
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
这个是错误日志
[Wed Dec 03 01:43:17 2008] [error] [client 192.168.16.1] (13)!!!!!!!!: Could not open password file: /apachepasswd/passwd
[Wed Dec 03 01:43:17 2008] [error] [client 192.168.16.1] user web not found: /acltest
[Wed Dec 03 01:50:31 2008] [error] [client 192.168.16.1] user web: authentication failure for "/acltest": Password Mismatch
[Wed Dec 03 01:50:33 2008] [error] [client 192.168.16.1] user web: authentication failure for "/acltest": Password Mismatch
这个是访问时的提示
This server could not verify that you are authorized to access the URL "/acltest". You either supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
fengmx 于 2008-12-04 15:16:44发表:
不清楚。。
HCH2005 于 2008-12-03 18:59:31发表:
是不是进passwd文件中改了密码??