$ sudo certbot certonly --webroot -w /storage/web/ -d zebra.iptime.org
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for zebra.iptime.org
Using the webroot path /storage/web for all unmatched domains.
Waiting for verification...
Cleaning up challenges
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/zebra.iptime.org/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/zebra.iptime.org/privkey.pem
Your cert will expire on 2020-09-30. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew *all* of your certificates, run
"certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
sudo a2enmod ssl
sudo a2ensite zebra.iptime.org
mv /etc/Apache2/sites-available/default-ssl.conf /etc/Apache2/sites-available/zebra.iptime.org.conf
#아래의 내용으로 파일 수정
#DocumentRoot /storage/web
#SSLCertificateFile “/etc/letsencrypt/live/zebra.iptime.org/cert.pem”
#SSLCertificateKeyFile “/etc/letsencrypt/live/zebra.iptime.org/privkey.pem”
#SSLCertificateChainFile “/etc/letsencrypt/live/zebra.iptime.org/chain.pem”
sudo service apache2 restart
80번으로 접속시 자동으로 443으로 리다이렉션 시킬 경우 아래와 같이 수정
인증서 갱신
sudo certbot renew --dry-run
아니면 아래에 등록해서 정기적으로 수행
/etc/crontab/
/etc/cron.*/*
systemctl list-timers
참고
https://certbot.eff.org/lets-encrypt/ubuntufocal-other
최근 댓글