Nginx 添加 Auth Basic 认证

root@WebITS:~# apt-get install apache2-utils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  apache2-utils
0 upgraded, 1 newly installed, 0 to remove and 222 not upgraded.
Need to get 82.5 kB of archives.
After this operation, 349 kB of additional disk space will be used.
Get:1 http://mirrors.huaweicloud.com/ubuntu/ trusty-security/main apache2-utils amd64 2.4.7-1ubuntu4.22 [82.5 kB]
Fetched 82.5 kB in 0s (1243 kB/s)       
Selecting previously unselected package apache2-utils.
(Reading database ... 67626 files and directories currently installed.)
Preparing to unpack .../apache2-utils_2.4.7-1ubuntu4.22_amd64.deb ...
Unpacking apache2-utils (2.4.7-1ubuntu4.22) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up apache2-utils (2.4.7-1ubuntu4.22) ...
root@WebITS:~# htpasswd -b /etc/nginx/htpasswd 401_user 401_pass
本作品采用《CC 协议》,转载必须注明作者和本文链接
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!