BK cloud / sistemas Artigos
PT-BR
English ENDeutsch DEEspañol ES中文 ZHFrançais FRPortuguês (Brasil) PT-BR日本語 JA
Vamos conversar ↗
← Voltar aos artigos

WordPress e Let’s Encrypt

Nota de arquivo: este artigo documenta as ferramentas de Ubuntu e Certbot disponíveis em 2019.

Veja como configurar um certificado TLS Let’s Encrypt no Ubuntu 18.04, supondo que Apache, LAMP e WordPress já estejam funcionando e que você controle o domínio.

add-apt-repository ppa:certbot/certbot
apt install python-certbot-apache
certbot –apache -d berndkuhlen.de -d www.berndkuhlen.de
certbot renew –dry-run

Configure um cron job do Certbot para manter o certificado atualizado.

O meu ficou assim:

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

Esta é minha configuração, gerada automaticamente:

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

Me surpreendeu o Certbot atualizar automaticamente o Apache para incluir o certificado novo e ouvir na porta 443.