Ngin web configuration password
1, first edit the nginx.conf configuration file to create (marked in red) server { listen 80; server_name xxxxx; location / { root html; index index.html index.htm; }2. Generate the username and corresponding password file by htpasswd command. mkdir /usr/local/nginxhtpasswd -c /usr/local/nginx/passwd admin ####Create authentication information, admin is authentication username New password: ***** ####Enter authentication password Re-type new password: ****** Add password for user admin cat /usr/local/nginx/passwd ####You can see that the password generated by htpasswd is encrypted format 3. Restart nginxnginx -s reload.