-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
42 lines (35 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
worker_processes auto;
events {
worker_connections 2048;
use epoll;
}
http {
sendfile on;
access_log off;
error_log off;
upstream api01 {
server api01:8080;
}
upstream api02 {
server api02:8080;
}
upstream api {
server api01:8080;
server api02:8080;
}
map $uri $api {
default api;
~/clientes/[13579]+ api01;
~/clientes/[02468]+ api02;
}
server {
listen 9999;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://$api;
}
}
}