主要是解决一个 https 的证书问题

# 安装 certbot
sudo apt-get update
sudo apt-get install certbot -y

# 运行命令获取证书, xxxxx.com 为你的域名
# 会验证你的域名,就是确保是你的域名
# 验证的方式很简单,就是在你的域名下放置一个校验文件
certbot certonly --standalone -d xxxxx.com

# 提示需要输入你的邮箱,续签通知
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Enter email address (used for urgent renewal and security notices)
 (Enter 'c' to cancel): sxy@shuxiaoyuan.com

# 接受条款
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y

# 接受广告
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y

# 开始生成证书
Account registered.
Requesting a certificate for demo-dev.shuxiaoyuan.com
Performing the following challenges:
http-01 challenge for demo-dev.shuxiaoyuan.com
Cleaning up challenges

# 报错了,哈哈哈,因为 80 端口被占用了
Problem binding to port 80: Could not bind to IPv4 or IPv6.


# 验证成功后,Certbot 将颁发 SSL 证书并将其保存在 /etc/letsencrypt/live/xxxxx.com 目录下

# 后续就是在 nginx 的配置文件里面配置上你的证书即可

证书续签问题