-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.dev.conf
31 lines (26 loc) · 870 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 {
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://client:5173
proxy_pass http://client:5173;
}
# 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';
# Requests are directed to http://server:3000
proxy_pass http://server:3000;
}
}
}