-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathnginx.conf
48 lines (37 loc) · 817 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
42
43
44
45
46
47
48
worker_processes 1;
error_log /var/log/nginx/error.log crit;
worker_rlimit_nofile 8192;
events {
worker_connections 512;
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;
default_type application/json;
server_names_hash_bucket_size 128;
reset_timedout_connection on;
client_body_timeout 10;
send_timeout 2;
keepalive_timeout 30;
keepalive_requests 100000;
upstream api {
server api1:8080 max_conns=256;
server api2:8080 max_conns=256;
# queue 2048 timeout=60;
}
server {
listen 9999;
server_name localhost;
location / {
proxy_pass http://api;
}
}
}