fanxing3.conf
2.7 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
upstream gateway {
server 127.0.0.1:30000;
server 192.168.9.233:30000;
server 192.168.9.133:30000;
}
server {
listen 30010;
server_name localhost;
client_max_body_size 500;
location / {
alias /xmh/fanxing3/page/;
index index.html;
}
location /srs/ {
rewrite ^/srs/(.*) /$1 break;
proxy_pass http://192.168.9.233:8080;
}
location /api/ {
rewrite ^/api/(.*) /$1 break;
proxy_pass http://gateway;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /api/video-server/ {
rewrite ^/api/video-server/(.*) /$1 break;
add_header Access-Control-Allow-Methods '*';
add_header Access-Control-Allow-Headers 'Origin, X-Requested-With, Content-Type, Accept, Authorization';
proxy_pass http://192.168.9.233:10350/;
}
location /api/video-cloud/ {
rewrite ^/api/video-cloud/(.*) /$1 break;
proxy_pass http://192.168.9.233:8888/;
}
}
# grafana
server {
listen 33000;
location / {
proxy_pass http://192.168.9.233:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_hide_header 'Access-Control-Allow-Origin';
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Credentials 'true';
add_header Access-Control-Allow-Methods '*';
add_header Access-Control-Allow-Headers 'Origin,X-Requested-With,Content-Type,Accept,Authorization,Referer,User-Agent,x-grafana-org-id';
if ( $request_method = 'OPTIONS' ) {
return 200;
}
}
}
# prometheus
server {
listen 39090;
location / {
proxy_pass http://192.168.9.233:9090;
}
}
# consul
server {
listen 38500;
location / {
proxy_pass http://192.168.9.233:8500;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_hide_header 'Access-Control-Allow-Origin';
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Credentials 'true';
add_header Access-Control-Allow-Methods '*';
add_header Access-Control-Allow-Headers 'Origin,X-Requested-With,Content-Type,Accept,Authorization,Referer,User-Agent,x-grafana-org-id';
if ( $request_method = 'OPTIONS' ) {
return 200;
}
}
}