-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathnginx.conf
41 lines (36 loc) · 998 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
39
40
41
worker_processes 80;
events {
use epoll;
multi_accept on;
worker_connections 2000;
}
http {
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=webcache:1000m inactive=1y max_size=1000m;
proxy_temp_path /var/cache/nginx/tmp;
proxy_cache_min_uses 1;
access_log off;
sendfile off;
tcp_nodelay on;
tcp_nopush on;
upstream api {
least_conn;
server api01:3000;
server api02:3000;
keepalive 1000;
}
server {
listen 9999;
http2 on;
location / {
proxy_buffering off;
proxy_set_header Connection "";
proxy_set_header Keep-Alive "";
proxy_set_header Proxy-Connection "keep-alive";
proxy_http_version 1.1;
proxy_cache webcache;
proxy_cache_valid any 15s;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_pass http://api;
}
}
}