로그인

검색

OracleCloud
2023.02.22 15:49

let's encrypt 설치

조회 수 63 추천 수 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 156
공지 XE/Rhmix 라이믹스,XE 외부페이지 php 보안관련 꽃지닷컴 2022.03.16 176
공지 XE/Rhmix PHP PDO CRUD with ajax jQuery and Bootstrap 회원관리(사진등록) file 꽃지닷컴 2021.03.19 738
공지 XE/Rhmix soengsouy- PHPCRUD ALL FILE file 꽃지닷컴 2021.03.19 212
공지 XE/Rhmix [구매하자] CRUD Application with PHP, PDO, and MySQL secret 꽃지닷컴 2021.03.19 0
공지 XE/Rhmix 라이믹스 사이트 모음 꽃지닷컴 2021.03.02 345
공지 XE/Rhmix XE 참고 사이트 모음 secret 꽃지닷컴 2017.04.13 134
229 노트북 특정 키보드 입력 안될 때 키보드 오류 꽃지닷컴 2023.01.10 121
228 노드 설치 2 file 꽃지닷컴 2023.01.04 19
227 영상제작 다빈치 리졸브 꽃지닷컴 2022.12.04 17
226 영상제작 교회 유튜브 실시간 방송 꽃지닷컴 2022.12.04 17
225 KT 인터넷 요금제명 변경 file 꽃지닷컴 2022.11.10 13
224 아웃룩 (OUTLOOK) 2022 최신버전 다운로드 받기 꽃지닷컴 2022.10.26 76
223 디지털바다 - 각종 커뮤니티와 웹정보를 확인할 수 있다. secret 꽃지닷컴 2022.10.18 0
222 sd카드 파일을 내 컴퓨터로 FTP로 빠르게 전송하기 꽃지닷컴 2022.08.27 25
221 오라클 클라우드 ubuntu nignx HTTPS 사용하기 Let's encrypt 갱신하기 secret 꽃지닷컴 2022.08.24 0
220 서버 이전 후 게시판 썸네일이 뜨지 않을 때 꽃지닷컴 2022.05.31 62
219 XE/Rhmix 라이믹스 게시판 파일첨부시 파일 또는 디렉토리를 생성할 수 없습니다. 오류 문구 꽃지닷컴 2022.05.26 99
218 FxSound file 꽃지닷컴 2022.03.15 68
217 OFFICE 협업툴 시장 file 꽃지닷컴 2022.03.06 8
216 XE/Rhmix 반응형 레이아웃 secret 꽃지닷컴 2022.03.03 0
215 데이터 라벨링 부업 꽃지닷컴 2021.12.11 43
214 크라우드웍스 데이터 라벨링 입문과정 12/3- 꽃지닷컴 2021.11.26 138
213 WEB 무료 템플릿으로 멋진 페이지 제작 꽃지닷컴 2021.11.09 59
212 PC 노는PC로 맥OS 설치하기 Big Sur file 꽃지닷컴 2021.10.13 102
211 PC [인증서오류] 크롬 연결이 비공개로 설정되어 있지 않습니다. file 꽃지닷컴 2021.10.08 169
210 PC 디지털캠프 맥사양 file 꽃지닷컴 2021.10.06 12
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 14 Next
/ 14