Nginx 新增 Auth Basic 認證

MAYBE-CRY發表於2021-07-07
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 協議》,轉載必須註明作者和本文連結

相關文章