forked from liubin915249126/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathportal.conf
More file actions
executable file
·55 lines (44 loc) · 1.67 KB
/
portal.conf
File metadata and controls
executable file
·55 lines (44 loc) · 1.67 KB
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
server {
listen 80;
server_name testadmin.portal.com;
location ^~ /api/ {
proxy_set_header Host 127.0.0.1;
proxy_set_header Origin http://127.0.0.1:9099;
proxy_pass http://127.0.0.1:9099/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header Access-Control-Allow-Origin *;
}
location / {
# redirect all HTTP traffic to localhost:8000
proxy_set_header Host testadmin.portal.com;
proxy_pass http://localhost:8000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
server {
listen 8001;
server_name localhost;
location ^~ /api/ {
proxy_set_header Host 192.168.31.108;
proxy_set_header Origin http://192.168.31.108:9099;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded_proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://192.168.31.108:9099/;
add_header Access-Control-Allow-Origin *;
}
location ^~ / {
proxy_set_header Host localhost;
proxy_set_header Origin http://localhost:8000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded_proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8000/;
add_header Access-Control-Allow-Origin *;
}
}