-
Notifications
You must be signed in to change notification settings - Fork 2
/
proxy-nginx.conf
47 lines (39 loc) · 1.31 KB
/
proxy-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
worker_processes 4;
events {
worker_connections 512;
}
http {
limit_conn_zone $binary_remote_addr zone=two:10m;
limit_req_zone $binary_remote_addr zone=one:10m rate=50r/m;
upstream server_cluster {
server 10.42.0.109:8080 weight=1;
server 10.42.0.109:8081 weight=1;
server 10.42.0.109:8082 weight=1;
server 10.42.0.109:8083 weight=1;
keepalive 32;
}
server {
server_name localhost;
listen 80;
# Timeout parameters
# client_body_timeout 1s;
# client_header_timeout 1s;
location / {
# Limiting number of connections
# limit_conn two 10;
# Limiting number of requests
# limit_req zone=one burst=100;
# Disable cache
proxy_redirect off;
proxy_cache off;
# Headers for client browser NOCACHE + CORS origin filter
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
expires off;
proxy_connect_timeout 3;
proxy_send_timeout 3;
proxy_read_timeout 3;
send_timeout 3;
proxy_pass http://server_cluster;
}
}
}