-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnginx.conf
38 lines (30 loc) · 954 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
worker_processes 16;
events {
}
http {
limit_conn_zone $http_x_forwarded_for zone=conn_limit_per_ip:10m;
limit_req_zone $http_x_forwarded_for zone=req_limit_per_ip:10m rate=10r/s;
server {
access_log off;
limit_conn conn_limit_per_ip 25;
limit_req zone=req_limit_per_ip burst=10 nodelay;
listen 80;
proxy_connect_timeout 10s;
proxy_send_timeout 5m;
proxy_read_timeout 5m;
location / {
proxy_pass http://frontend:80;
proxy_http_version 1.1;
proxy_set_header Host $host;
}
location /api {
proxy_pass http://backend:8081;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header Origin $host;
proxy_cache_bypass $http_upgrade;
}
}
}