아카이브 안내: 이 글은 2019년 당시의 Ubuntu와 Certbot 도구를 기준으로 작성됐어요.

Apache, LAMP 스택, WordPress가 이미 동작 중이고 도메인 제어권을 갖고 있다는 전제하에 Ubuntu 18.04에서 Let’s Encrypt TLS 인증서를 설정하는 방법이에요.
add-apt-repository ppa:certbot/certbot
apt install python-certbot-apache
certbot –apache -d berndkuhlen.de -d www.berndkuhlen.de
certbot renew –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이 새 인증서를 반영하고 443 포트를 열도록 Apache 설정까지 자동으로 업데이트해 줬어요.


클라우드 / 시스템