Enter email address (used for urgent renewal and security notices) (Enter 'c'to cancel): youremail@example.com(你的邮箱)
接受服务条款:
1 2
Doyouagree? (Y)es/(N)o:Y
是否分享邮箱给 EFF:
1 2
Would you be willing to share your email withthe Electronic Frontier Foundation? (Y)es/(N)o: N
成功后返回:
1 2 3 4 5 6 7 8
Successfully received certificate. Certificateis saved at: /etc/letsencrypt/live/huishao.fun/fullchain.pem Keyis saved at: /etc/letsencrypt/live/huishao.fun/privkey.pem This certificate expires on 2025-12-29. Deploying certificate Successfully deployed certificate for huishao.fun to /etc/nginx/conf.d/hexo.conf Successfully deployed certificate for www.huishao.fun to /etc/nginx/conf.d/hexo.conf Congratulations! You have successfully enabled HTTPS on https://huishao.fun and https://www.huishao.fun
[!IMPORTANT]
如果第一次申请证书失败可以再重新执行
3、检查是否 Nginx 自动跳转 HTTPS(可选)
在 /etc/nginx/conf.d/nginx.conf 中增加:
根据自己配置文件为主,一般certbot都会默认加上去的
1 2 3 4 5
server { listen80; server_name huishao.fun www.huishao.fun; return301 https://$host$request_uri; }