朱争光

一点点攒起我的那片天

  • 主页
  • 文章分类
  • 标签
  • 我

朱争光

一点点攒起我的那片天

  • 主页
  • 文章分类
  • 标签
  • 我

nginx base auth

2016-04-20

##config
增加两行配置

1
2
3
4
location / {
auth_basic "closed site";
auth_basic_user_file conf/htpasswd;
}

##生成htpasswd
生成一个用户名admin,密码admin的帐户

1
2
sudo sh -c "echo -n 'admin:'" >> htpasswd
sudo sh -c "openssl passwd admin" >> htpasswd

centos 网络
ghost 使用
豫ICP备17013970号-1 | Copyright © daozzg.com 保留所有权利。2019 朱争光