htmlwordpress 让我们加密吧 — 伯恩德·库伦
BK BERND KUHLEN所有笔记 ↗
← 返回实地笔记

wordpress 然后加密吧

存档说明:本文记录了2019年可用的Ubuntu和Certbot工具。

以下是在 Ubuntu 18.04 上配置 Let's Encrypt TLS 证书的方法,前提是 Apache、LAMP 堆栈和 WordPress 已经在运行并且你控制了该域。

add-apt-repository ppa: certbot/certbot
apt 安装 python-certbot-apache
certbot —apache-d berndkuhlen.de-d www.berndkuhlen.de
certbot 续订 —dry-run

确保你有一个 Certbot cron 任务来保持证书处于最新状态。

这是我的样子:

0 0 * * * /usr/bin/certbot renew >/home/ubuntu/certbot.txt 
2>/home/ubuntu/certbot.err

这是我的配置,它是自动生成的:

renew_before_expiry = 30 days
version = 0.31.0
archive_dir = /etc/letsencrypt/archive/berndkuhlen.de
cert = /etc/letsencrypt/live/berndkuhlen.de/cert.pem
privkey = /etc/letsencrypt/live/berndkuhlen.de/privkey.pem
chain = /etc/letsencrypt/live/berndkuhlen.de/chain.pem
fullchain = /etc/letsencrypt/live/berndkuhlen.de/fullchain.pem
Options used in the renewal process
[renewalparams]
account = SOMEACCOUNTID
authenticator = apache
installer = apache
server = https://acme-v02.api.letsencrypt.org/directory

我很惊讶地看到 Certbot 自动更新了我的 Apache 配置,加入了新证书并在端口 443 上监听。


BERND KUHLEN · 云工程实地笔记
ZH
EnglishENDeutschDEEspañolES中文ZH