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 적용 #56

Merged
merged 41 commits into from
Jan 19, 2024
Merged

개발서버 https 적용 #56

merged 41 commits into from
Jan 19, 2024

Conversation

jinhoon227
Copy link
Contributor

@jinhoon227 jinhoon227 commented Jan 18, 2024

⭐️ Issue Number

🚩 Summary

개발 서버에 https 를 적용합니다. 원활한 https 적용을 위해 도메인을 발급했습니다. SSL/TLS 를 적용하기위해 certbot, Let's encrypt 를 이용해 발급했습니다. 그리고 Nginx 에 이를 적용해 서버 앞단에서 nginx 가 클라이언트와 통신하도록 하였습니다.

🛠️ Technical Concerns

�HTTPS

HTTPS 를 사용할 경우 보안성이 상향되며, HTTP 에 없는 기능을 사용할 수 있습니다.
그리고 안드로이드의 경우 HTTP 와 통신을 하기위해서는 추가적인 절차가 필요하여 간편하게 하기위해 적용했습니다.

도메인

원할한 HTTPS 발급을 위해 도메인을 발급했습니다. 가비아에서 구매하였으며 1년만 사용하면 저렴한 가격에 구할 수 있습니다. IP 로도 적용이 가능하지만 일반적인 방법이 아니며, 추후 다른 API 를 사용할때 도메인으로 제한된곳도 있어 확장성을 고려하여 도메인을 구매했습니다.

  • 개발서버 도메인 : dev.nainga.store

NGINX

NGINX 는 웹서버로 로드밸런싱, 정적파일캐싱 등 여러기능을 제공합니다. 그 중에서 포트포워딩, SSL/TLS 기능을 사용하기위해 NGINX 를 사용했습니다. 포트포워딩 기능은 도메인->ip 로 변경된 주소에 포트를 붙여 Springboot 와 통신을 해줄 수 있게 합니다. 그리고 SSL/TLS 를 적용할 수 있어 서버와 클라이언트에 대해 HTTPS 통신을 가능하게 합니다.

Certbot, Let's encrypt

Let's encrypt 는 인증서를 발급해줍니다
Certbot 의 경우 Let's encrypt 에서 인증서를 발급해주는 복잡한 절차를 알아서 해줍니다. 그 후 발급받은 인증서를 NGINX 에 설정을 하면 https 통신이 가능하게 됩니다. 해당 인증서의 경우 90일간의 만료기간이 있지만, cron 을 이용하여 1일, 15,일 25일 오전 5시에 자동갱신하도록 처리했습니다. 그 과정에서 NGINX 가 재시작되므로 해당 시간에는 잠시 통신이 안될 수 있습니다.

close #52

@jinhoon227 jinhoon227 added the ✨ Feature 기능 관련 label Jan 18, 2024
@jinhoon227 jinhoon227 requested a review from sungjindev January 18, 2024 11:07
@jinhoon227 jinhoon227 self-assigned this Jan 18, 2024
Copy link

github-actions bot commented Jan 18, 2024

Test Results

11 tests  ±0   11 ✅ ±0   13s ⏱️ -1s
 8 suites ±0    0 💤 ±0 
 8 files   ±0    0 ❌ ±0 

Results for commit f17bd60. ± Comparison against base commit 4c536ea.

♻️ This comment has been updated with latest results.

@jinhoon227 jinhoon227 changed the title 서버 https 적용 개발서버 https 적용 Jan 19, 2024
Copy link
Contributor

@sungjindev sungjindev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

복잡한 과정들이었을텐데 그동안 너무 고생 많으셨습니다~
승인합니다.

@jinhoon227 jinhoon227 merged commit 1027241 into develop Jan 19, 2024
3 checks passed
@jinhoon227 jinhoon227 deleted the feature/set-https(#52) branch January 19, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 기능 관련
Projects
None yet
Development

Successfully merging this pull request may close these issues.

서버 https 적용
2 participants