sf-utils2 sf-utils2
版本v3.3.3-beta1
首页
  • 01.快速开始 🔥
  • 02.基础-Base
  • 03.对象-Object
  • 04.数组-Array
  • 05.方法-Function
  • 06.字符串-String
  • 07.数学-Math
  • 08.dom
  • 09.拓展
  • webpack5.x教程学习 (opens new window)
  • 例子
  • 教程 🔥
  • 例子配置
企业级后台模版 (opens new window)
版本v3.3.3-beta1
首页
  • 01.快速开始 🔥
  • 02.基础-Base
  • 03.对象-Object
  • 04.数组-Array
  • 05.方法-Function
  • 06.字符串-String
  • 07.数学-Math
  • 08.dom
  • 09.拓展
  • webpack5.x教程学习 (opens new window)
  • 例子
  • 教程 🔥
  • 例子配置
企业级后台模版 (opens new window)
  • Nginx配置

    • 教程🔥
    • 指南者留学nginx配置
    • 溧阳口腔nginx配置
    • 本地mac nginx配置
    • 阿里云服务器nginx配置
    • 匿名sit配置
    • 匿名uat配置
  • nginx配置
  • Nginx配置
bianpengfei
2024-02-03

匿名sit配置

#web-sit
#pc
upstream web-pc-sit {
    server 158.233.255.43:30147;
}
#mobile
upstream web-mobile-sit {
    server 158.233.255.43:30145;
}
#msit
upstream web-msite-sit {
    server 158.233.255.43:30146;
}
#micro-workflow
upstream web-micro-workflow-sit {
    server 158.233.255.43:30046;
}


#backend-sit
upstream opr-gateway-sit {
    server 158.233.255.43:31020;
}
upstream platform-gateway-sit {
    server 158.233.255.43:31024;
}
upstream app-gateway-sit {
    server 158.233.255.43:31026;
}
upstream track-gateway-sit {
    server 158.233.255.43:31028;
}


#主应用
server {
    listen 8180;
    server_name localhost;

    set $is_mobile false;

    if ($http_user_agent ~* "(Android|iPhone|Windows Phone|UC|Kindle)") {
        set $is_mobile true;
    }


    # pc adjust to msite
    location = / {
        proxy_pass http://web-pc-sit;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;

        #if ($http_user_agent ~* "(Android|iPhone|Windows Phone|UC|Kindle)") {
        #  rewrite ^/(.*)$ http://200.200.200.143:8080/msite/#/$1 permanent;
        #}
        if ($is_mobile = true) {
            rewrite ^/(.*)$ /msite/ redirect;
        }
    }

    #m站
    location = /msite/ {
        proxy_pass http://web-msite-sit;
        client_max_body_size 10G;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        if ($is_mobile = false) {
            rewrite ^/msite/(.*)$ / permanent;
        }
        rewrite ^/msite/(.*)$ /$1 break;
    }


    # pc
    location / {
        proxy_pass http://web-pc-sit;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
    #m站
    location ^~ /msite/ {
        proxy_pass http://web-msite-sit;
        client_max_body_size 10G;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        rewrite ^/msite/(.*)$ /$1 break;
    }
    #流程引擎
    location ^~ /micro-workflow/ {
        proxy_pass http://web-micro-workflow-sit;
        client_max_body_size 10G;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        rewrite ^/micro-workflow/(.*)$ /$1 break;
    }
    #移动端
    location ^~ /mobile/ {
        proxy_pass http://web-mobile-sit;
        client_max_body_size 10G;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        #rewrite ^(.*)$ /system-maintaining/default.html permanent;
    }

    #sit-backend
    location /opr {
        proxy_pass http://opr-gateway-sit;
        client_max_body_size 10G;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 3600s;
    }
    location /platform {
        proxy_pass http://platform-gateway-sit;
        client_max_body_size 10G;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 3600s;
    }
    location /app {
        proxy_pass http://app-gateway-sit;
        client_max_body_size 10G;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 3600s;
    }

    location /track {
        proxy_pass http://track-gateway-sit;
        client_max_body_size 10G;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 300s;
    }

    location /zsap-pre {
        proxy_pass http://158.233.255.43:7777;
        client_max_body_size 10G;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 300s;
    }


    location = /zsap-pre/ {
        root html;
    }


    #      location = /CJXUzf5H3U.txt {
    #      root /opt/nginx/html;
    #     }
    location = /apple-app-site-association {
        root /opt/nginx/html;
    }


    location /zsap-sit {
        proxy_pass http://158.233.255.43:9000;
        proxy_set_header Host $http_host;
        proxy_connect_timeout 15s;
        proxy_send_timeout 15s;
        proxy_read_timeout 15s;
        proxy_set_header X-Forwarded-Proto http;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

}


#msit-web
server {
    listen 8146;
    server_name localhost;

    location / {
        proxy_pass http://158.233.255.43:30146;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

# 移动端
server {
    listen 8145;
    server_name localhost;

    location / {
        proxy_pass http://158.233.255.43:30145;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}


# pc-ceshi
server {
    listen 8111;
    server_name localhost;

    location / {
        proxy_pass http://158.233.255.43:30148;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

# element-plus-docs
server {
    listen 8115;
    server_name localhost;

    location ^~ /vant/ {
        proxy_pass http://158.233.255.43:30149;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        rewrite ^/vant/(.*)$ /vant/$1 break;
    }

    location / {
        proxy_pass http://158.233.255.43:30150;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;

    }
}


# vant-ui-docs
server {
    listen 8112;
    server_name localhost;

    location / {
        proxy_pass http://158.233.255.43:30149;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

# element-plus-docs
server {
    listen 8113;
    server_name localhost;

    location / {
        proxy_pass http://158.233.255.43:30150;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
上次更新: 2024/02/20, 17:23:36
阿里云服务器nginx配置
匿名uat配置

← 阿里云服务器nginx配置 匿名uat配置→

Theme by Vdoing | Copyright © 2022-2025 bianpengfei
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式
×