apache 配置:

<Directory "/">
  AuthType "Basic"
  AuthName "Password Required" #提示文字
  AuthUserFile "D:\wwwroot\sites\pass.txt" #加密密码的文件
  Require valid-user
</Directory>

生成加密密码文件:

D:\apache\bin\htpasswd.exe -cmdps D:\pass.txt admin
Warning: CRYPT algorithm not supported on this platform.
Automatically using MD5 format.
New password: *****
Re-type new password: *****
Adding password for user admin

相关文章:https://blog.csdn.net/weixin_34256074/article/details/94087380

标签: none

添加新评论