侧边栏壁纸
博主头像
Kefei的记事本博主等级

好脑瓜不如烂笔头

  • 累计撰写 219 篇文章
  • 累计创建 11 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

ubuntu系统使用Certbot配置SSL证书

Administrator
2024-06-08 / 0 评论 / 0 点赞 / 0 阅读 / 1182 字

使用Certbot配置SSL证书【ubuntu系统】

https://blog.csdn.net/weixin_45314989/article/details/124287900

https://zhuanlan.zhihu.com/p/80909555

sudo certbot renew

certbot renew --renew-hook "service nginx reload"

Step1:安装snapd【linux包管理工具】

sudo apt install snapd #安装snapd

sudo snap install core #安装core

sudo snap refresh core #刷新core

Step2::安装certbot【一个开源免费的工具,为网站自动安装基于Let’s Encrypt服务的SSL证书】

sudo snap install --classic certbot #安装certbot

sudo ln -s /snap/bin/certbot /usr/bin/certbot #创建链接以确保certbot的正确运行

Step3:创建SSL证书【使用certbot创建ssl证书】

方式一:为所有域创建 SSL 证书并在 Web 服务器中配置重定向(推荐这种)

sudo certbot --nginx #nginx安装ssl证书

sudo certbot --apache #apache安装ssl证书

方式二:为指定域创建 SSL 证书

sudo certbot --nginx -d example.com -d www.example.com

sudo certbot --apache -d example.com -d www.example.com

方式三:仅安装 SSL 证书

sudo certbot certonly --nginx

sudo certbot certonly --apache

0

评论区