-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.conf
67 lines (54 loc) · 1.57 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
65
66
67
worker_processes 1;
events {
worker_connections 2048;
}
http {
upstream cf-services {
server cf-service-1:1000;
server cf-service-2:1002;
}
upstream cf-db-services {
server cf-db-service-1:1004;
server cf-db-service-2:1006;
}
upstream redis-services {
server redis-service-1:1008;
server redis-service-2:1010;
}
upstream cf-kafka-services {
server cf-kafka-service-1:1012;
server cf-kafka-service-2:1014;
}
upstream hzct-services {
server hzct-service-1:1016;
server hzct-service-2:1018;
}
server {
listen 80;
location /cf {
proxy_pass http://cf-services/api/v1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /cf-db {
proxy_pass http://cf-db-services/api/v1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /redis {
proxy_pass http://redis-services/api/v1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /cf-kafka {
proxy_pass http://cf-kafka-services/api/v1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /hzct {
proxy_pass http://hzct-services/api/v1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
}