-
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.
Merge pull request #135 from 2024-SummerBootcamp-Team/develop
[main] main Merge
- Loading branch information
Showing
9 changed files
with
176 additions
and
36 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
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,38 @@ | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
|
||
upstream backend { # upstream으로 설정 및 서버 문제시 다른 서버로 이동 | ||
server fastapi-blue:8000; | ||
} | ||
|
||
|
||
# DOS 공격 방어를 위한 설정 | ||
limit_req_zone $binary_remote_addr zone=limit_per_ip:10m rate=10r/s; | ||
limit_conn_zone $binary_remote_addr zone=addr:10m; | ||
|
||
server { | ||
listen 80; | ||
listen [::]:80; | ||
|
||
# 백엔드 프록시 설정 | ||
location / { | ||
proxy_pass http://backend; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Host $server_name; | ||
proxy_set_header X-NginX-Proxy true; | ||
proxy_set_header Host $host; | ||
proxy_cache_bypass $http_upgrade; | ||
|
||
|
||
# DOS 공격 방지를 위한 설정 | ||
limit_req zone=limit_per_ip burst=10; | ||
limit_conn addr 10; | ||
} | ||
|
||
} | ||
|
||
} |
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,38 @@ | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
|
||
upstream backend { # upstream으로 설정 및 서버 문제시 다른 서버로 이동 | ||
server fastapi-green:8000; | ||
} | ||
|
||
|
||
# DOS 공격 방어를 위한 설정 | ||
limit_req_zone $binary_remote_addr zone=limit_per_ip:10m rate=10r/s; | ||
limit_conn_zone $binary_remote_addr zone=addr:10m; | ||
|
||
server { | ||
listen 80; | ||
listen [::]:80; | ||
|
||
# 백엔드 프록시 설정 | ||
location / { | ||
proxy_pass http://backend; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Host $server_name; | ||
proxy_set_header X-NginX-Proxy true; | ||
proxy_set_header Host $host; | ||
proxy_cache_bypass $http_upgrade; | ||
|
||
|
||
# DOS 공격 방지를 위한 설정 | ||
limit_req zone=limit_per_ip burst=10; | ||
limit_conn addr 10; | ||
} | ||
|
||
} | ||
|
||
} |
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