티스토리 뷰
https 를 사용하기 위해 certbot 으로 인증서를 발급받는 과정입니다
인증서 발급중에는 기존에 80번포트로 운영중인 서비스가 있었다면 잠시 꺼두셔야 합니다
1. 설치
sudo apt install certbot
2. 인증서 발급
$ certbot certonly --standalone Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator standalone, Installer None Enter email address (used for urgent renewal and security notices) (Enter 'c' to cancel): danu.apps.co@gmail.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Please read the Terms of Service at https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must agree in order to register with the ACME server at https://acme-v02.api.letsencrypt.org/directory - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (A)gree/(C)ancel: A - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Would you be willing to share your email address with the Electronic Frontier Foundation, a founding partner of the Let's Encrypt project and the non-profit organization that develops Certbot? We'd like to send you email about our work encrypting the web, EFF news, campaigns, and ways to support digital freedom. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (Y)es/(N)o: N Please enter in your domain name(s) (comma and/or space separated) (Enter 'c' to cancel): {내 서버 도메인주소 입력} Obtaining a new certificate Performing the following challenges: http-01 challenge for {입력한 서버 도메인주소} Waiting for verification... Cleaning up challenges IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/{입력한 서버 도메인주소}/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/{입력한 서버 도메인주소}/privkey.pem Your cert will expire on 2022-09-13. 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 |
3. 인증서 자동 갱신
- 인증서의 유효기간이 3개월이기 때문에 주기적으로 갱신해줘야 합니다
- crontab 을 이용해 갱신하면됩니다
crontab -e
# 아래 추가
0 0 1 * * /usr/bin/certbot renew
- 매월 1일 0시 0분에 갱신하게 됩니다
'개발 일반' 카테고리의 다른 글
(MongoDB) 백업 & 복원하기 (0) | 2022.08.19 |
---|---|
(기타) 한글을 영어로, 영어를 한글로(단순변경) (0) | 2022.06.15 |
(MongoDB) find(select)에서 일부 필드 포함/제외하기 (0) | 2022.06.10 |
무료 사진, 아이콘, 폰트 검색하기 (0) | 2022.06.10 |
(MongoDB) Aggregate - Count/Sum/Avg/Min/Max (0) | 2022.06.09 |
댓글
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday