-
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
[Env/#53] Nginx 설정 및 docker-compose 파일 내용 수정
- Loading branch information
Showing
2 changed files
with
54 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# HTTP에서 HTTPS로 리다이렉트 | ||
server { | ||
listen 80; | ||
server_name bookmile.site www.bookmile.site; | ||
|
||
location / { | ||
return 301 https://$host$request_uri; | ||
} | ||
} | ||
|
||
# HTTPS 설정 | ||
server { | ||
listen 443 ssl; | ||
server_name bookmile.site www.bookmile.site; | ||
|
||
# SSL 인증서 경로 (Let's Encrypt 인증서) | ||
ssl_certificate /etc/letsencrypt/live/bookmile.site/fullchain.pem; | ||
ssl_certificate_key /etc/letsencrypt/live/bookmile.site/privkey.pem; | ||
|
||
# SSL 설정 강화 | ||
ssl_protocols TLSv1.2 TLSv1.3; | ||
ssl_ciphers HIGH:!aNULL:!MD5; | ||
|
||
# 애플리케이션 프록시 | ||
location / { | ||
proxy_pass http://application:8080; # 'application'은 docker-compose.yml에서 정의된 서비스 이름 | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
} | ||
} |