


























原文:https://ichochy.com/posts/blog/20240110.html
使用 certbot 可以很方便、快捷的通过 Let’s Encrypt 申请免费的证书,并部署到 nginx 中,开启 HTTP。
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
Enter email address (used for urgent renewal and security notices)
(Enter 'c' to cancel): [email protected]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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.
Please enter the domain name(s) you would like on your certificate (comma and/or
space separated) (Enter 'c' to cancel): ichochy.com
Successfully received certificate.
……
Deploying certificate
Successfully deployed certificate for ichochy.com to /etc/nginx/sites-enabled/default
Congratulations! You have successfully enabled HTTPS on https://ichochy.com
访问 https://ichochy.com,已经自动跳转到 HTPPS,证书已经成功部署到 Nginx 中,并成功配置并重启成功
Nginx 配置文件 /etc/nginx/sites-enabled/default
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。