로그인

검색

OracleCloud
2023.02.22 15:49

let's encrypt 설치

조회 수 64 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
snapd 삭제

apt autoremove --purge snapd

rm -rf /snap
rm -rf /var/snap
rm -rf /var/lib/snapd

 

snapd 설치

 

$ sudo apt update

$ sudo apt install snapd

$ sudo snap install hello-world

$ sudo snap install --classic certbot

인증서 발급 

$ sudo certbot --nginx 

or

$ sudo certbot --nginx -d [적용할 사이트 이름] -d [www.적용할사이트이름]

 

그런데 certbot이 이미 사용중이란다.

Another instance of Certbot is already running.

Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-lgu7_172/log or re-run Certbot with -v for more details.

 

강제로 certbot 모듈을 죽여보자

 

find / -type f -name ".certbot.lock" -exec rm {} \;

재시도

$ sudo certbot --nginx -d [적용할 사이트 이름] -d [www.적용할사이트이름]

 

 

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Could not read file: /etc/nginx/sites-enabled/default due to invalid character. Only UTF-8 encoding is supported.
Requesting a certificate for test.com and www.kkotji.com
Could not read file: /etc/nginx/sites-enabled/default due to invalid character. Only UTF-8 encoding is supported.

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/test.com/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/test.com/privkey.pem
This certificate expires on 2023-05-23.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate
Could not read file: /etc/nginx/sites-enabled/default due to invalid character. Only UTF-8 encoding is supported.
Could not install certificate

NEXT STEPS:
- The certificate was saved, but could not be installed (installer: nginx). After fixing the error shown below, try installing it again by running:
  certbot install --cert-name test.com

Could not automatically find a matching server block for test.com. Set the `server_name` directive to use the Nginx installer.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
 

Successfully로 떠서 되긴 하지만 머냐.. 저것들은...  아마 default의  주석부분 한글 때문인듯 하다.

 

#바로 재생긴 한번 해보자

sudo certbot renew
#만료정보확인
sudo certbot certificates

 Expiry Date: 2023-05-23 05:55:17+00:00 (VALID: 89 days)
 

 

#Crontab으로 만료일 갱신하기 renew하기 

# sudo su

crontab -e

  1. /bin/nano        <---- easiest
  2. /usr/bin/vim.basic
  3. /usr/bin/vim.tiny
  4. /bin/ed

Choose 1-4 [1]: 1

 

0 3 * * * certbot renew --renew-hook "sudo service nginx restart"
0 4 * * 1 root shutdown now -r   이거는 빼야할것 같다. 임시ip라 재부팅시 ip변경될 가능성 있음

다음으로 변경
0 3 * * * certbot renew --renew-hook "sudo systemctl reload nginx"

분시일월

Who's 꽃지닷컴

profile

Respect yourself and others will respect you

- 창의적 사고를 하자!

- 소규모 웹사이트 제작 및 수정 (24시간 항시대기)

?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 XE/Rhmix 오라클 클라우드 - 우분투(Ubuntu) php7.3에서 php7.4로 업그레이드 하기 꽃지닷컴 2022.03.17 166
공지 XE/Rhmix 라이믹스,XE 외부페이지 php 보안관련 꽃지닷컴 2022.03.16 180
공지 XE/Rhmix PHP PDO CRUD with ajax jQuery and Bootstrap 회원관리(사진등록) file 꽃지닷컴 2021.03.19 742
공지 XE/Rhmix soengsouy- PHPCRUD ALL FILE file 꽃지닷컴 2021.03.19 214
공지 XE/Rhmix [구매하자] CRUD Application with PHP, PDO, and MySQL secret 꽃지닷컴 2021.03.19 0
공지 XE/Rhmix 라이믹스 사이트 모음 꽃지닷컴 2021.03.02 350
공지 XE/Rhmix XE 참고 사이트 모음 secret 꽃지닷컴 2017.04.13 134
229 영상편집 PC 겨넞ㄱ 꽃지닷컴 2024.04.05 217
228 XE/Rhmix XE, 라이믹스 웹호스팅 '서버 오류' 발생 시 에러 로그 확인하기 꽃지닷컴 2020.07.17 217
227 WEB 탭메뉴 꽃지닷컴 2017.07.08 214
226 WEB 인증서 재설치 시 오류 꽃지닷컴 2023.02.14 213
225 편집파일 /layouts/xe_kimtajo_layout/css 꽃지닷컴 2017.12.06 213
224 XE/Rhmix 채팅 스크립트 Channel 꽃지닷컴 2017.12.28 209
223 OFFICE E-Book 제작 프로그램 꽃지닷컴 2017.04.13 208
222 CSS hover 효과 꽃지닷컴 2018.05.06 207
221 XE/Rhmix 모바일 또는 이외기기 조건문으로 다르게 보이기 꽃지닷컴 2018.01.04 207
220 PC 노트북 전원이 들어오지 않을 때 file 꽃지닷컴 2019.04.28 206
219 WEB 카페24 ssl 인증서 설치 file 꽃지닷컴 2021.01.27 197
218 XE/Rhmix Xedition 레이아웃 본문만 부트스트랩 적용하기 꽃지닷컴 2018.03.18 197
217 XE/Rhmix 합창단 xe > rhymix 이전 file 꽃지닷컴 2021.03.19 195
216 DESIGN After Effects 강좌 file 꽃지닷컴 2019.02.14 193
215 XE/Rhmix Rhtmix 이전 후 도메인 변경 꽃지닷컴 2017.10.14 193
214 DESIGN 무료 이미지 꽃지닷컴 2018.04.26 192
213 WEB 무료주문서 관리 꽃지닷컴 2017.04.24 192
212 WEB SSL - Sectigo PositiveSSL 해외에서 구매하여 카페24에 설치하기 file 꽃지닷컴 2021.03.17 185
211 WEB html5 media no dowload 꽃지닷컴 2019.01.29 185
210 DESIGN 애니메이션 효과 CSS 꽃지닷컴 2018.04.24 181
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 14 Next
/ 14