Nginx 添加 HTTP 基本认证
生成密码
printf "your_username:$(openssl passwd -crypt your_password)\n" >> conf.d/passwd
编辑 Nginx 配置文件
location /
{
auth_basic_user_file conf.d/passwd;
}
文章来自:chenxuhua.com
printf "your_username:$(openssl passwd -crypt your_password)\n" >> conf.d/passwd
location /
{
auth_basic_user_file conf.d/passwd;
}