-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
개발서버 https 적용
- Loading branch information
Showing
4 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
|
||
# -------------------- spring-boot-prod WAS -------------------- | ||
upstream backend { | ||
server server:8080; | ||
} | ||
|
||
# -------------------- spring-boot-dev WAS -------------------- | ||
server { | ||
listen 80; | ||
server_name dev.nainga.store; | ||
|
||
# certbot 이 소유자임을 확인하는 경로 | ||
location /.well-known/acme-challenge { | ||
root /var/lib/letsencrypt/; # 사용자 인증을 위한 파일이 생성 되는곳 | ||
} | ||
|
||
# Redirect all traffic to HTTPS | ||
location / { | ||
return 301 https://$host$request_uri; | ||
} | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
server_name dev.nainga.store; | ||
|
||
ssl_certificate /etc/letsencrypt/live/dev.nainga.store/fullchain.pem; | ||
ssl_certificate_key /etc/letsencrypt/live/dev.nainga.store/privkey.pem; | ||
|
||
location / { | ||
proxy_pass http://backend; | ||
proxy_set_header Host $host; # 클라이언트가 요청한 호스트의 도메인 | ||
proxy_set_header X-Real-IP $remote_addr; # 클라이언트의 실제 IP 주소 | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 원격 클라이언트의 실제 IP 주소와, 이전에 거친 프록시 서버의 IP 주소들이 쉼표로 구분되어 포함 | ||
} | ||
} | ||
} |
Submodule backend-submodule
updated
from ac45bc to ac3b02