Skip to content

Commit

Permalink
nginx.conf파일 흐름제어 설정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Contingency1 committed Sep 5, 2024
1 parent d5b78e5 commit f02abcd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ events {
}

http {
# 요청 속도 제한 초당 30개 이상 요청 시 503 에러 발생
limit_req_zone $binary_remote_addr zone=restrict:10m rate=30r/s;

server {
listen 80; # 포트 번호
server_name 도메인.com; # 도메인 이름 ex:) eomjunsick.com api.eomjunsick.com
Expand Down Expand Up @@ -30,6 +33,9 @@ http {
access_log /var/log/nginx/access.log; # 로그 파일 경로
error_log /var/log/nginx/error.log; # 에러 로그 파일 경로

# 요청 속도 제한
limit_req zone=restrict burst=10 nodelay;

location / {
proxy_pass http://컨테이너서비스이름:3000; # http://[container_name]:[port]
proxy_set_header Host $host; # host
Expand Down

0 comments on commit f02abcd

Please sign in to comment.