1.安装certbot
apt install certbot python3-certbot-nginx
2.配置nginx中的server_name
3.执行certbot
certbot --nginx -d aaa.test.com -d www.test.com
其中aaa.test.com等是你要注册的域名
4.注意事项
执行报错:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 2: ordinal not in range(128)
说明nginx配置中包含中文,去除后再次执行即可
网友评论