location / {
auth_basic "closed site";##Context:http, server, location, limit_except
auth_basic_user_file conf/htpasswd;##Context:http, server, location, limit_except
}
# cat conf/htpasswd
xyJkVhXGAZ8tM
systemctl restart nginx