申请免费SSL/HTTPS通配符证书
申请单个域名证书
certbot: https://certbot.eff.org/
安装命令行工具及申请
选择对应的软件和系统版本
1 |
# 安装依赖 |
设置自动续签
1 |
# 通用 |
申请通配符域名证书
阿里云等国内域名商购买域名
申请证书
centOS需要提前安装依赖
1 |
pip uninstall requests |
1 |
sudo certbot certonly --manual / # 通配符模式 |
-
出现如下提示后,前往域名解析管理后台新增TXT解析
-
添加记录
-
添加后不要马上回车继续,等待解析生效
-
检查解析
1 |
# macOS |
- 出现匹配的提示后继续,申请成功
证书存储在/etc/letsencrypt/live/example.com
设置自动续签
1 |
# 通用 |
删除证书
cerbot delete
1 |
cerbot delete |
输入对应数字即可删除