Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPS 접속 #61

Open
shunnyjang opened this issue Sep 22, 2020 · 1 comment
Open

HTTPS 접속 #61

shunnyjang opened this issue Sep 22, 2020 · 1 comment

Comments

@shunnyjang
Copy link
Contributor

대주제 : 다행 서비스를 배포하고 싶다
소주제 : HTTPS로 접속하게 하고 싶다

ACM을 통해 SSL 발급 받기

  1. AWS - AWS Certificate Manager - [인증서 프로비저닝]
  • 인증서 프로비저닝 : DNS를 통해서 AWS에서 SSL 인증서를 발급 받는다
  • [공인 인증서 요청]
    image

  • 도메인 이름 적기
    image

  • [DNS 검증]

  • [확인 및 요청]

  • 검증 보류인 상태에서 CNAME 유형의 레코드 생성하기 ([Route53에서 레코드 생성])

@shunnyjang
Copy link
Contributor Author

shunnyjang commented Sep 23, 2020

Let's encrypted에서 SSL 인증서 다운로드하기

필요한 것

  • 서버 (nginx)
  • DNS
  1. Cerbot 다운로드
  • Cerbot :
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt update
sudo apt-get install python-certbot-nginx  # 서버 엔진에 따라 바꿔주기
  1. SSL 설치
sudo certbot --nginx -d api.dahanegback.shop
# 이메일 입력
# a 입력
# y 입력
# 2 선택 (1 : http --> https 리다이렉트 x / 2 : http --> https 리다이렉트 o)
  1. 다음과 같은 메세지가 뜨면 성공!
IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/api.dahaengback.shop/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/api.dahaengback.shop/privkey.pem
   Your cert will expire on 2020-12-22. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - 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
공개키 path : /etc/letsencrypt/live/api.dahaengback.shop/fullchain.pem
비밀키 path : /etc/letsencrypt/live/api.dahaengback.shop/privkey.pem

이제 https로 접속된다
https://api.dahaengback.shop/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant