Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: nginx 설정 변경
Browse files Browse the repository at this point in the history
SeungGwan123 committed Nov 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 49847e6 commit 6df7143
Showing 2 changed files with 8 additions and 10 deletions.
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -24,7 +24,6 @@ services:
- server
volumes:
- ./ssl/certificate.crt:/etc/nginx/ssl/certificate.crt
- ./ssl/ca_bundle.crt:/etc/nginx/ssl/ca_bundle.crt
- ./ssl/private.key:/etc/nginx/ssl/private.key
networks:
- app-network
17 changes: 8 additions & 9 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -6,22 +6,21 @@ events {
http{
# HTTPS 서버 설정
server {
listen 443 ssl;
listen 443 ssl default_server;
server_name corinee.site www.corinee.site;

# SSL 인증서 설정
ssl_certificate /etc/nginx/ssl/certificate.crt;
ssl_certificate_key /etc/nginx/ssl/private.key;
ssl_trusted_certificate /etc/nginx/ssl/ca_bundle.crt;

# client 서비스로 프록시 (프론트엔드 애플리케이션)
location / {
proxy_pass http://client:80; # client 컨테이너의 포트로 프록시
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# location / {
# proxy_pass http://client:80; # client 컨테이너의 포트로 프록시
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# }

# server 서비스로 프록시 (API 요청을 server로 전달)
location /api {

0 comments on commit 6df7143

Please sign in to comment.