Certbot 创建 ssl 证书
文章目录
下载 certbot-auto 自动安装脚本
|
|
CentOS7 + Nginx 环境
配置 nginx
- 备份现有配置文件
- 删除 /etc/nginx/nginx.conf 中 http 块里的全部 server 块
- 清空 /etc/nginx/conf.d 目录
新建 /etc/nginx/conf.d/80.conf,内容如下
1 2 3 4
server { listen 80; server_name aa.example.com bb.example.com; }
重载 nginx 配置
1
nginx -s reload
certbot 生成 nginx ssl 证书,并修改 nginx 配置
1
certbot-auto --nginx -d aa.example.com -d bb.expmple.com
按照业务需求,自行修改 nginx 配置
续签证书
|
|
文章作者 Colben
上次更新 2019-10-30