-
Notifications
You must be signed in to change notification settings - Fork 0
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
개발서버 https 적용 #56
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sungjindev
approved these changes
Jan 19, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
복잡한 과정들이었을텐데 그동안 너무 고생 많으셨습니다~
승인합니다.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
⭐️ Issue Number
🚩 Summary
개발 서버에 https 를 적용합니다. 원활한 https 적용을 위해 도메인을 발급했습니다. SSL/TLS 를 적용하기위해 certbot, Let's encrypt 를 이용해 발급했습니다. 그리고 Nginx 에 이를 적용해 서버 앞단에서 nginx 가 클라이언트와 통신하도록 하였습니다.
🛠️ Technical Concerns
�HTTPS
HTTPS 를 사용할 경우 보안성이 상향되며, HTTP 에 없는 기능을 사용할 수 있습니다.
그리고 안드로이드의 경우 HTTP 와 통신을 하기위해서는 추가적인 절차가 필요하여 간편하게 하기위해 적용했습니다.
도메인
원할한 HTTPS 발급을 위해 도메인을 발급했습니다. 가비아에서 구매하였으며 1년만 사용하면 저렴한 가격에 구할 수 있습니다. IP 로도 적용이 가능하지만 일반적인 방법이 아니며, 추후 다른 API 를 사용할때 도메인으로 제한된곳도 있어 확장성을 고려하여 도메인을 구매했습니다.
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