본문 바로가기
항해99

[TIL] 항해 4일차

by yeaseul912 2022. 7. 14.
728x90

오늘은 미니프로젝트 마지막 날입니다.

왜 3일차는 없냐구요? 개인사정으로 빠졌습니다. 하하하하

 

저 없는동안 다른 조원분들이 프로젝트를 멋지게 완성 시켜주셔서 너무 좋아요. 역시 이게 1조인가?

- 목차 -
오늘 일정
작업 내용
  - github branch 삭제
  - readme 작성
  - Certbot을 이용한 https 적용해보기
오늘 일정

- 최종 제출 ( ~18까지 )

  1. 웹사이트 링크
  2. 제목
  3. 설명
  4. 데모영상 유튜브 링크 (녹음/설명 없이 둘러보는 용도로 녹화해주세요)
  5. 데모영상 썸네일 이미지 (280*160 사이즈를 권장합니다)
  6. github 주소 (public)

- 회고 발표 ( 18시~22시 )

  • 한 조 당 15분씩 진행
    • 1분 30초: 프로젝트 소개 + 시연
    • 2분 30초 : 우리팀이 개발을 진행하면서 Restful하게 API를 작성했는지, 어려웠던 점, 해결한 내용 (트러블슈팅)
    • 1분 : 앞으로 시간이 더 있었다면 어떤 것을 더 할 수 있었을지

 

작업 내용

- github branch 삭제

프로젝트가 완료 되었으니 git hub branch를 삭제해봅니다.

 

일단 main과 branch, origin/branch를 열심히 head로 끌고 올라와주고

--- development/Spabucks ‹main› » git pull origin main
From https://github.com/kwonih1020/Spabucks
 * branch            main       -> FETCH_HEAD
Updating 6774a16..b6255be
Fast-forward
 10 files changed, 478 insertions(+), 78 deletions(-)
--- development/Spabucks ‹main› » git checkout yeaseul_payService
Switched to branch 'yeaseul_payService'
Your branch is up to date with 'origin/yeaseul_payService'.
--- development/Spabucks ‹yeaseul_payService› » git pull origin main        1 ↵
From https://github.com/kwonih1020/Spabucks
 * branch            main       -> FETCH_HEAD
Updating 6774a16..e6edf39
--- development/Spabucks ‹yeaseul_payService➔› » git push origin yeaseul_payService
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/kwonih1020/Spabucks.git
   6774a16..e6edf39  yeaseul_payService -> yeaseul_payService

삭제해줍니다!!

--- development/Spabucks ‹main› » git branch -d yeaseul_payService
Deleted branch yeaseul_payService (was e6edf39).
--- development/Spabucks ‹main› » git push origin -d yeaseul_payService   129 ↵
To https://github.com/kwonih1020/Spabucks.git
 - [deleted]         yeaseul_payService

 

- readme 작성

최근에 작성한 Github 정리하기 를 참고하여 써보았다.

깃허브 주소 : https://github.com/kwonih1020/Spabucks

 

- Certbot을 이용한 https 적용해보기

 

1. nginx설치

2. 인바운드 규칙 추가 443 포트

3. cecrtbot설치

$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository universe
$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update

근데 certbot이 안깔린다. 404 not found.. 그래서 curl로 설치하는 방법을 알아냈다.

sudo curl -o- https://raw.githubusercontent.com/vinyll/certbot-install/master/install.sh | bash

80포트가 사용중이란다.

(venv) ubuntu@ip-172-31-38-208:/$ sudo netstat -ltnp | grep :80

(venv) ubuntu@ip-172-31-38-208:/$ sudo kill -9 13847

 

nginx 설정 바꿔주고 재시작

(venv) ubuntu@ip-172-31-38-208:/$ sudo vi /etc/nginx/sites-available/default
(venv) ubuntu@ip-172-31-38-208:/$ sudo service nginx restart

 

ubuntu@ip-172-31-38-208:~$ sudo certbot --nginx -d ahley.shop -d www.ahley.shop
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for ahley.shop and www.ahley.shop

Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
  Domain: ahley.shop
  Type:   connection
  Detail: 15.165.205.223: Fetching http://ahley.shop/.well-known/acme-challenge/eD8UQZJjpBPUVIwKqDxNKFnV5euctB6uRDyMGCCIW9k: Timeout during connect (likely firewall problem)

  Domain: www.ahley.shop
  Type:   connection
  Detail: 15.165.205.223: Fetching http://www.ahley.shop/.well-known/acme-challenge/1siGy9P_wktdopDQyS9kF2iVlFf9BQnlbbVAHID9_Ec: Timeout during connect (likely firewall problem)

Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.

Some challenges have failed.
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.

 

아래 에러는 너무 많이 인증서 발급을 시도해서 나오는거라 1시간 정도 기다려야 한단다.

ubuntu@ip-172-31-38-208:~$ sudo certbot --nginx -d ahley.shop -d www.ahley.shop
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for ahley.shop and www.ahley.shop
An unexpected error occurred:
Error creating new order :: too many failed authorizations recently: see https://letsencrypt.org/docs/failed-validation-limit/
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.

아 개킹받네 내일 다시해야지

 

reference

certbot 404에러 발생시 설치

[Linux] vertbot 404 error type: unauthorized 해결하기

AWS EC2와 도메인 연결(가비아)

2. nginx 설치 및 설정 (Ubuntu 18.04 LTS)

AWS linux2에서 Nginx로 Ls Encrypt 사용하기

[AWS] Vertbot/ Let's encrypt SSL 인증서 적용하기 HTTPS적용하기

Let's Encrypt SSl 인증서 발급 오류 DNS문제 (NXDOMAIN) 해결 방법

[SSL인증 이슈] DNS problem: NXDOMAIN looking up A for domain

EC2에 nginx 설치 및 세팅

HTTPS 적용하기

github remote branch 삭제

 

 

반응형

'항해99' 카테고리의 다른 글

[WIL] 항해 7일차  (0) 2022.07.19
[TIL] 항해5일차  (0) 2022.07.16
[TIL] 항해 2일차  (0) 2022.07.13
[TIL] 항해 1일차  (0) 2022.07.11
[미니PJ] S.A(Starting Assignment)  (0) 2022.07.11

댓글