分类: 系统运维
2008-05-21 14:00:31
htpasswd -c /usr/local/apache/passwd/passwords username
将会提示你输入密码和确认密码,如:
New password: mypassword
Re-type new password: mypassword
Adding password for user username
再在http.conf里增加类似如下内容:
AllowOverride AuthConfig
AuthType Basic
AuthName "限制文件"
AuthUserFile /usr/local/apache/passwd/passwords
Require user username