每天都越来越需要使用 SSL 的站点。 它无处不在的执法挑战了网站加密,甚至是谷歌已经采取的一项努力。 证书机器人和 Let’s Encrypt 由于易于实施,它是大型和小型企业的流行解决方案。 Certbot 是一个软件客户端,可以下载到服务器上,比如我们的一个 Ubuntu VPS 服务器,以安装和自动更新 SSL。 它通过与著名的 SSL 提供商合作获得这些 SSL,称为 Let’s Encrypt. 在本教程中,我们将向您展示在您的网站上启用 HTTPS 的快速方法。 让我们开始吧!
飞行前
- Apache 已为您的域安装了一个虚拟主机文件
- 以 root 用户身份登录
- 您的域需要 A 记录, Let’s Encrypt 验证将通过 DNS 查找执行
第1步: 更新 易于 以确保我们使用最新的打包工具。
apt update && upgrade
第2步: 我们将安装 Certbot 软件,因为这将有助于从 Let’s Encrypt. 类型 是 当提示继续时。
sudo apt install certbot
第 3 步: 安装 Certbot Apache 包也是必需的。 类型 是 当提示继续时。
apt install python-certbot-apache
第4步: 是时候从 Let’s Encrypt. Enter 您的电子邮件地址并按照提示进行操作。 此步骤将查看您的 /etc/apache2/sites-available/yourdomain.com.conf 文件,特别是使用 服务器名称 指示。
注意如果您的安装给出“授权程序失败”消息确保您已按照 Apache 配置文章,并且为您的域设置了 A 记录。
certbot --apache
-------------------------------------------------------------------------------
Please read the Terms of Service at
https://dtnqes.com/images/9/1652447291.jpg"},{"@type":"Article","@id":"https://dtnqes.com/article/483836#article","url":"https://dtnqes.com/article/483836","headline":"如何设置 Let’s Encrypt 在 Ubuntu 18.04 上","datePublished":"2022-05-13T05:08:11+00:00","dateModified":"2022-05-13T05:08:17+00:00","wordCount":388,"keywords":["Apache","Install","Python","Ubuntu","VPS"],"articleSection":["article"],"isPartOf":{"@id":"https://dtnqes.com/article/483836#webpage"},"mainEntityOfPage":{"@id":"https://dtnqes.com/article/483836#webpage"},"image":{"@id":"https://dtnqes.com/article/483836#thumbnail"},"publisher":{"@id":"https://dtnqes.com/#organization"},"author":{"@id":"https://dtnqes.com/article/483836#author"}},{"@type":"Person","@id":"https://dtnqes.com/article/483836#author","url":"https://dtnqes.com/author/mzdya/","name":"mzdya","image":{"@id":"https://dtnqes.com/article/483836#author_image"}},{"@type":"ImageObject","@id":"https://dtnqes.com/article/483836#author_image","url":"https://secure.gravatar.com/avatar/aa1d5ea659c6e7cee3be89b7061bdff6?s=96&d=mm&r=g","width":96,"height":96,"caption":"mzdya"}]}