|
rt!
实验平台为:winxp做host OS、centos5.3做guest OS
安装Apache版本:httpd-2.2.8-jason.3
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
AuthType Basic
AuthName "Top Secret"
AuthDBMType default
AuthDBMUserFile /etc/httpd/dbhtpasswds
#AuthDBMGroupFile /etc/httpd/dbusergrouplist
Require user is_mysql
#Require group usergroup1
</Directory>
使用htdbm来增加用户
htdbm -c /etc/httpd/dbhtpasswds is_mysql
输入两遍密码
401错误
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser
doesn't understand how to supply the credentials required.
查看httpd的错误日志:
tail /var/log/httpd/error_log
[Fri Jun 26 20:59:08 2009] [error] [client 192.168.1.10] access to / failed, reason: verification of user id 'is_mysql' not configured
但是
htdbm -l /etc/httpd/dbhtpasswds
返回
Dumping records from database -- /etc/httpd/dbhtpasswds
Username Comment
is_mysql
Total #records : 1
怪哉!到底是为什么呢? |
|