-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.dev.conf
32 lines (26 loc) · 861 Bytes
/
nginx.dev.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
# events is required, but defaults are ok
events { }
# A http server, listening at port 80
http {
resolver 127.0.0.1 ipv6=off;
server {
listen 80;
# Requests starting with root (/) are handled
location / {
# The following 3 lines are required for the hot loading to work (websocket).
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
# Requests are directed to http://localhost:3000
proxy_pass http://app:3000/;
}
# Requests starting with /api/ are handled
location /api/ {
# The following 3 lines are required for the hot loading to work (websocket).
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_pass http://api:4000/;
}
}
}