-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathnginx.conf
64 lines (47 loc) · 1.24 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
# user web;
# worker_processes 8;
# worker_rlimit_nofile 65535;
pid /run/nginx.pid;
events {
# worker_connections 65535;
worker_connections 1000;
multi_accept on;
use epoll;
}
http {
access_log off;
sendfile on;
client_body_buffer_size 10k;
client_header_buffer_size 1k;
client_max_body_size 8m;
large_client_header_buffers 2 1k;
client_body_timeout 32;
client_header_timeout 32;
keepalive_timeout 90;
send_timeout 120;
reset_timedout_connection on;
open_file_cache max=200000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
tcp_nopush on;
tcp_nodelay on;
types_hash_max_size 2048;
gzip on;
gzip_disable "MSIE [1-6]\.";
gzip_proxied expired no-cache no-store private auth;
gzip_comp_level 9;
gzip_min_length 500; # Default 20
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
upstream api {
server api01:30001;
server api02:30002;
}
server {
listen 9999;
location / {
proxy_pass http://api;
}
}
# include /etc/nginx/conf.d/*.conf;
}