This repository has been archived by the owner on Aug 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.conf
64 lines (51 loc) · 1.53 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
events {
worker_connections 1024; # The maximum number of simultaneous connections that can be opened by a worker process.
}
http {
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream orecode-backend {
server orecode-backend:8000; # Replace PORT with your prod backend's port
}
upstream orecode-backend-staging {
server orecode-backend-staging:8000; # Replace PORT with your staging backend's port
}
server {
listen 80;
server_name orecode-backend.tbwright.dev;
location / {
proxy_pass http://orecode-backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
}
location ~ ^/vans/ {
proxy_pass http://orecode-backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
mirror /mirror;
}
location /mirror {
internal;
proxy_pass http://orecode-backend-staging$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Original-URI $request_uri;
}
}
server {
listen 80;
server_name orecode-backend-staging.tbwright.dev;
location / {
proxy_pass http://orecode-backend-staging;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
}
}
}