-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathnginx.conf
64 lines (47 loc) · 1.16 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
worker_processes auto;
worker_rlimit_nofile 100000;
error_log /var/log/nginx/error.log crit;
events {
worker_connections 4000;
use epoll;
multi_accept on;
}
http {
open_file_cache max=200000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
access_log off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
gzip on;
gzip_min_length 10240;
gzip_comp_level 1;
gzip_vary on;
gzip_disable msie6;
gzip_proxied expired no-cache no-store private auth;
gzip_types
application/json
reset_timedout_connection on;
client_body_timeout 10;
send_timeout 2;
keepalive_timeout 30;
keepalive_requests 100000;
upstream api {
server localhost:8080;
server localhost:8081;
keepalive 500;
}
server {
listen 9999;
location / {
proxy_buffering off;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_set_header Keep-Alive "";
proxy_set_header Proxy-Connection "keep-alive";
proxy_pass http://api;
}
}
}