首页
学习
活动
专区
圈层
工具
发布

在 Ubuntu 20.04 上使用 Let’s Encrypt 保护 Apache

sudo a2enmod http2 重新加载 Apache 配置,使得修改生效: sudo systemctl reload apache2 现在我们可以运行 Certbot 工具,配合 webroot...重新加载 Apache 配置,使得修改生效: sudo systemctl reload apache2 你现在可以使用 https:// 打开你的网站,你将看到一个绿色的锁图标。...附加--renew-hook "systemctl reload apache2"到/etc/cron.d/certbot文件,看起来就像下面这样: 运行下面的命令创建一个新的 cronjob,它将会刷新证书...reload apache2" 想要测试刷新过程,使用 certbot 命令加上--dry-run选项: sudo certbot renew --dry-run 如果没有错误提示,那就意味着刷新过程是成功的...想要了解更多关于 Certbot 脚本,浏览:Certbot 官方文档。

3.8K21
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    网站升级HTTPS与HTTP2记录

    文章地址 为什么要把网站升级到HTTPS 怎样把网站升级到http/2 升级HTTPS 升级的好处如文章所说,另外这里主要用的是certbot-auto g clone https://github.com.../certbot/certbot.git cd certbot 申请建议只申请证书,nginx配置自己来配. ..../acme-v02.api.letsencrypt.org/directory ###Nginx配置并且升级HTTP2 正如原作者所说HTTP2具有太多的优势,比如多路复用,对同一个域的服务器只建立一次...要注意的是 Nginx启用http2则需要安装http_v2_module模块,并且需要openssl版本大于1.0.2,由于Chrome改变了验证http2的方式,详情可以参考此文章https://news.cnblogs.com...对于chrome最可信的调试方式是访问chrome://net-internals/#http2,如果显示你的网站使用的协议为h2,那么恭喜你开启了http2 目前https://www.itoolshub.com

    2.5K40

    使用 Ubuntu 终端设置 Web 服务器

    使用以下命令安装:sudo apt install apache2 -y安装完成后,启动 Apache 服务:sudo systemctl start apache2为确保 Apache 在重新启动后自动启动...:sudo systemctl enable apache2你可以通过在 Web 浏览器中导航到服务器的 IP 地址来验证 Apache 是否正在运行。...为使其首先提供 index.php,编辑 dir.conf:sudo nano /etc/apache2/mods-enabled/dir.conf将 index.php 移到列表的最前面,使其看起来像这样...要使用它,首先安装 Certbot:sudo apt install certbot python3-certbot-apache -y然后,请求证书:sudo certbot --apache按照屏幕上的说明操作...设置完成后,Certbot 将自动更新你的证书。结论在 Ubuntu 上设置 Web 服务器是一件简单的事情,特别是当你将该过程分解为可管理的步骤时。

    88311

    用 Ubuntu 终端设置 Web 服务器

    使用以下命令安装:sudo apt install apache2 -y安装完成后,启动 Apache 服务:sudo systemctl start apache2为确保 Apache 在重新启动后自动启动...:sudo systemctl enable apache2你可以通过在 Web 浏览器中导航到服务器的 IP 地址来验证 Apache 是否正在运行。...为使其首先提供 index.php,编辑 dir.conf:sudo nano /etc/apache2/mods-enabled/dir.conf将 index.php 移到列表的最前面,使其看起来像这样...要使用它,首先安装 Certbot:sudo apt install certbot python3-certbot-apache -y然后,请求证书:sudo certbot --apache按照屏幕上的说明操作...设置完成后,Certbot 将自动更新你的证书。结论在 Ubuntu 上设置 Web 服务器是一件简单的事情,特别是当你将该过程分解为可管理的步骤时。

    59510

    如何使用Debian 9上的Let加密保护Apache

    本教程将用/etc/apache2/sites-available/example.com.conf作示例。...第1步 - 安装Certbot 使用Let's Encrypt获取SSL证书的第一步是在服务器上安装Certbot软件。 在撰写本文时,默认情况下,Debian软件存储库中不提供Certbot。...如果您遵循Apache安装教程中的虚拟主机设置步骤,那么您应该已经在/etc/apache2/sites-available/example.com.conf为您的域设置一个VirtualHost块,并且已经正确设置了该...要检查,请使用nano或其他您喜欢的文本编辑器打开您的域的虚拟主机文件: sudo nano /etc/apache2/sites-available/example.com.conf 找到现有的ServerName...配置文件的语法正确后,重新加载Apache以加载新配置: sudo systemctl reload apache2 Certbot现在可以找到正确的VirtualHost块并进行更新。

    1.5K30

    如何使用Debian 9上的Let加密保护Apache

    本教程将用/etc/apache2/sites-available/example.com.conf作示例。...第1步 - 安装Certbot 使用Let's Encrypt获取SSL证书的第一步是在服务器上安装Certbot软件。 在撰写本文时,默认情况下,Debian软件存储库中不提供Certbot。...如果您遵循Apache安装教程中的虚拟主机设置步骤,那么您应该已经在/etc/apache2/sites-available/example.com.conf为您的域设置一个VirtualHost块,并且已经正确设置了该...要检查,请使用nano或其他您喜欢的文本编辑器打开您的域的虚拟主机文件: sudo nano /etc/apache2/sites-available/example.com.conf 找到现有的ServerName...配置文件的语法正确后,重新加载Apache以加载新配置: sudo systemctl reload apache2 Certbot现在可以找到正确的VirtualHost块并进行更新。

    1.3K40

    实战撸Https 利用Let’s Encrypt在Ubuntu 16.04上配置免费的Https

    证书来源: Let’s Encrypt 站点支持:https://certbot.eff.org/ VPS环境:Ubuntu 16.04 Web服务器:Apache2 下面是配置流程,比较简单,按照官网的操作就可以进行了...sudo apt-get update $ sudo apt-get install software-properties-common $ sudo add-apt-repository ppa:certbot.../certbot $ sudo apt-get update $ sudo apt-get install python-certbot-apache 安装过程中一路yes和enter就可以了。...2.安装完成之后,开始使用cerbot $ sudo certbot –apache 配置成功,你的https已经可以使用了。 3.cerbot的证书是时效性的,接下来还要开启证书的自动更新功能。...$ sudo certbot renew –dry-run 运行如下命令,启动证书的自动更新。好了一切配置完成。 你可以愉快的使用https网站了。

    86740

    【译】Let’s Encrypt – 免费的SSLTLS证书

    安装客户端软件 如果你的操作系统包含了一个certbot的安装包,从这里安装它 ,然后使用相应的certbot命令。如果没有的话,则可以使用我们提供的cert-auto包装器脚本快速的获取一份。...$ git clone https://github.com/certbot/certbot $ cd certbot $ ..../certbot-auto --help certbot-auto 与certbot命令拥有相同的命令行参数;它会安装所有的依赖并且自动更新 Certbot 的代码(这个过程下载的文件比较大,因此比较慢...-w /var/www/thing -d thing.is,m.thing.is 如果你的证书安装在本地服务器,则一旦certonly命令执行完成,你需要重载服务器的配置文件(例如,对于apache2...服务器来说执行server apache2 reload命令)。

    1.3K40
    领券