-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnginx.conf
More file actions
40 lines (33 loc) · 879 Bytes
/
nginx.conf
File metadata and controls
40 lines (33 loc) · 879 Bytes
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
events {
worker_connections 1024;
}
http {
upstream traffic_worker {
server traffic_worker_1:5000;
}
upstream power_worker {
server power_worker_1:5001;
}
upstream env_worker {
server env_worker_1:5002;
}
server {
listen 80;
# Route Mobility/Camera Simulator Data
location /api/traffic {
proxy_pass http://traffic_worker;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# Route Grid/Power Simulator Data
location /api/power {
proxy_pass http://power_worker;
proxy_set_header Host $host;
}
# Route Environment Simulator Data
location /api/environment {
proxy_pass http://env_worker;
proxy_set_header Host $host;
}
}
}