标签 htpasswd 下的文章

实现这种效果,首次打开某个网页的时候要求输入账号密码

QQ截图20191010024834.png

如果不输入或输入错误,会提示

Unauthorized

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.

我知道这种授权交互这并不优雅毫无设计可言,但应用于部署在公网的内部系统缺不失为一个简陋但有效的一道安全屏障。
以下是nginx和apache的实现流程概要(centos下为例):


- 阅读剩余部分 -