Amazon Linux 2023 SSL(Let’s encrypt) 적용

sudo dnf install openssl mod_ssl

sudo dnf install -y python3 augeas-libs pip
sudo python3 -m venv /opt/certbot/

ls /opt/certbot

sudo /opt/certbot/bin/pip install –upgrade pip
sudo /opt/certbot/bin/pip install certbot
sudo ln -s /opt/certbot/bin/certbot /usr/bin/certbot

sudo systemctl stop httpd

sudo certbot certonly –standalone
이메일입력, Y, N, 도메인입력

sudo systemctl start httpd

sudo vi /etc/httpd/conf.d/ssl.conf

DocumentRoot “/var/www/html”
ServerAlias 도메인네임
SSLEngine on SSLCertificateFile /etc/letsencrypt/live/도메인네임/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/도메인네임/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/도메인네임/chain.pem

sudo systemctl restart httpd

sudo dnf install cronie-noanacron
sudo vi /etc/crontab

30 1 * * 2 root /usr/bin/certbot renew –post-hook “systemctl reload httpd”

Leave a Comment