화요일, 3월 18, 2025
HomeLet’s Encrypt 무료 SSL 인증서 갱신하기

Let’s Encrypt 무료 SSL 인증서 갱신하기

Let’s Encrypt 무료 SSL 인증서 갱신하기

Let’s Encrypt 무료 SSL 인증서는 3개월단위로 인증서가 발급됩니다.
매번 체크해서 인증서를 갱신할기보다는 Crontab에 등록하여 3개월마다
갱신되게 아래와 같이 스크립트생성후 crontab에 등록하는 과정을 메모합니다.

Shell Script 생성

touch /root/letsencrypt.sh

권한부여

chmod 755 /root/letsencrypt.sh

Shell Script 내용추가

vi /root/letsencrypt.sh

#!/bin/sh
/etc/init.d/nginx stop
if ! /root/tools/letsencrypt/letsencrypt-auto renew > /var/log/letsencrypt-renew.log 2>&1 ; then
	echo Automated renew failed;
	cat /var/log/letsencrypt-renew.log
	exit 1
fi
/etc/init.d/nginx start

crontab 아래 내용 추가

vi /etc/crontab

30 0 1 1-12/3 * root /root/letsencrypt.sh
RELATED ARTICLES

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular