LetsEncrypt SSL
- SSL ๋ฌด๋ฃ ์๋น์ค
- ์ธ๊ณ์ ์ธ ๋ฃจํธ ์ธ์ฆ๊ธฐ๊ด์ด ๋๋ฉ์ธ์ ์์ ํ๋ค๊ณ ๋ณด์ฆํ๋ ์๋น์ค
- DigiCert, VeriSign, Thawte, ...
- ๊ณ ๋น์ฉ, ๋๋ฉ์ธ๊ฐ * 10, ๋๋ต 20๋ง์/1๋
- https://letsencrypt.org/
- https ํ๋กํ ์ฝ์ ๋ฌด๋ฃ๋ก ์๋น์ค
- ๋คํธ์ํฌ ํจํท์ ์ํธํ
- ์ค๊ฐ์ ํจํท์ ๊ฐ๋ก์ฑ์ ๋ณผ ์ ์์
- ๋ณด์์ฑ์ด ์ข์์ง
- 90์ผ๋ง๋ค ๊ฐฑ์ ์ด ํ์ํจ(/etc/crontab)
ํ์์ฌํญ
- ๋๋ฉ์ธ (์ okdevtest.net)
- ์๋ฒ aws EC2 Amazon Linux 2023, Amazon Linux 2
nginx ์ค์น
certbot ์ด์ฉ
# Amazon Linux 2023
sudo su -
dnf install python3 augeas-libs -y
# dnf remove certbot
python3 -m venv /opt/certbot/
/opt/certbot/bin/pip install --upgrade pip
/opt/certbot/bin/pip install certbot certbot-nginx
ln -s /opt/certbot/bin/certbot /usr/bin/certbot
certbot --nginx
systemctl restart nginx
# Amazon Linux 2
sudo su -
yum -y install yum-utils
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install certbot python2-certbot-nginx
certbot --nginx
Set up automatic renewal
echo "0 0,12 * * * root python -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew" | sudo tee -a /etc/crontab > /dev/null
certbot renew issue
certbot renew
์๋๋ ๊ฒฝ์ฐ
certbot certonly -d v.okdevtv.com --manual --preferred-challenges dns
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name
_acme-challenge.v.okdevtv.com with the following value:
oRq2CDAXdLYxyoKUNYatfQqx1KWy8M29fPSgbkhka80
Before continuing, verify the record is deployed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue
- TXT ๋ ์ฝ๋ ์์ฑ
- _acme-challenge.v.okdevtv.com
- oRq2CDAXdLYxyoKUNYatfQqx1KWy8M29fPSgbkhka80
- ๊ทธ๋ฆฌ๊ณ ์์์ ์ํฐ๋ฅผ ๋๋ฅด๋ฉด ์๋์ผ๋ก ์์ฑ๋จ
- https://ddil-ddil.tistory.com/67
์ฐธ๊ณ