申请免费SSL/HTTPS通配符证书
申请单个域名证书
certbot: https://certbot.eff.org/
安装命令行工具及申请

选择对应的软件和系统版本


1 2 3 4 5 6
| sudo apt-get install certbot python-certbot-nginx
sudo certbot --nginx
sudo certbot certonly --nginx
|
设置自动续签
1 2 3 4
| # 通用 sudo certbot renew # 强制续签 sudo certbot renew --dry-run
|
申请通配符域名证书
阿里云等国内域名商购买域名
申请证书
centOS需要提前安装依赖
1 2 3 4 5 6 7
| pip uninstall requests pip uninstall urllib3 yum remove python-urllib3 yum remove python-requests yum install python-urllib3 yum install python-requests yum install certbot
|
1 2 3 4
| sudo certbot certonly --manual / # 通配符模式 -d *.example.com / # 个人域名 --email domain@example.com / # 购买域名邮箱 --server https://acme-v02.api.letsencrypt.org/directory / # letsencrypt API
|
1 2
| # macOS nslookup -type=txt _acme-challenge.ionantha.tech
|


证书存储在/etc/letsencrypt/live/example.com
设置自动续签
1 2 3 4
| # 通用 sudo certbot renew # 强制续签 sudo certbot renew --dry-run
|
删除证书
cerbot delete

输入对应数字即可删除