Let's Encrypt SSL 인증서 자동화
Let's Encrypt SSL 자동화
무료 SSL 인증서 발급부터 자동 갱신까지.
Certbot 설치
sudo apt install certbot python3-certbot-nginx
인증서 발급
# Nginx 플러그인으로 자동 설정
sudo certbot --nginx -d example.com -d www.example.com
# 와일드카드 (DNS 챌린지 필요)
sudo certbot certonly --manual --preferred-challenges dns -d *.example.com
자동 갱신
# 갱신 테스트
sudo certbot renew --dry-run
# crontab 설정
0 3 * * * certbot renew --quiet --post-hook "systemctl reload nginx"
인증서 확인
sudo certbot certificates
openssl x509 -in /etc/letsencrypt/live/example.com/cert.pem -text -noout
Let's Encrypt는 90일 유효. 자동 갱신 설정이 필수입니다.