-
Notifications
You must be signed in to change notification settings - Fork 928
/
nginx.conf
42 lines (36 loc) · 838 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
worker_processes auto;
events {
worker_connections 20000;
}
http {
access_log off;
sendfile on;
upstream api {
server api-1:8080;
server api-2:8080;
}
map $uri $valid_url {
default 0;
~^/clientes/[1-5]/(transacoes|extrato) 1;
# /clientes/1/transacoes 1;
# /clientes/2/transacoes 1;
# /clientes/3/transacoes 1;
# /clientes/4/transacoes 1;
# /clientes/5/transacoes 1;
# /clientes/1/extrato 1;
# /clientes/2/extrato 1;
# /clientes/3/extrato 1;
# /clientes/4/extrato 1;
# /clientes/5/extrato 1;
}
server {
listen 8000;
location / {
if ($valid_url) {
proxy_pass http://api;
break;
}
return 404;
}
}
}