chore: caddy config file(json)
nginx: proxy version api
This commit is contained in:
73
pkg/resource/nginx/caddy.json
Normal file
73
pkg/resource/nginx/caddy.json
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"apps": {
|
||||
"layer4": {
|
||||
"servers": {
|
||||
"proxy_8443_tcp_backends": {
|
||||
"listen": [":8443"],
|
||||
"routes": [
|
||||
{
|
||||
"handle": [
|
||||
{
|
||||
"handler": "proxy",
|
||||
"upstreams": [
|
||||
{"dial": ["10.118.2.11:32443"]},
|
||||
{"dial": ["10.118.2.12:32443"]}
|
||||
],
|
||||
"health_checks": {
|
||||
"active": {
|
||||
"interval": "5s",
|
||||
"timeout": "2s",
|
||||
"port": 32443
|
||||
},
|
||||
"passive": {
|
||||
"max_fails": 1,
|
||||
"fail_duration": "30s"
|
||||
}
|
||||
},
|
||||
"load_balancing": {
|
||||
"selection": {
|
||||
"policy": "round_robin"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"proxy_443_tcp_backends": {
|
||||
"listen": [":443"],
|
||||
"routes": [
|
||||
{
|
||||
"handle": [
|
||||
{
|
||||
"handler": "proxy",
|
||||
"upstreams": [
|
||||
{"dial": ["10.118.2.11:31443"]},
|
||||
{"dial": ["10.118.2.12:31443"]}
|
||||
],
|
||||
"health_checks": {
|
||||
"active": {
|
||||
"interval": "5s",
|
||||
"timeout": "2s",
|
||||
"port": 31443
|
||||
},
|
||||
"passive": {
|
||||
"max_fails": 1,
|
||||
"fail_duration": "30s"
|
||||
}
|
||||
},
|
||||
"load_balancing": {
|
||||
"selection": {
|
||||
"policy": "round_robin"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,10 @@ server {
|
||||
proxy_pass http://u-api-service/api/v2_2/client/download/check;
|
||||
}
|
||||
|
||||
location /api/v1/version {
|
||||
proxy_pass http://u-api-service/api/v2_2/client/version;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://hs-client-server;
|
||||
proxy_http_version 1.1;
|
||||
@@ -140,10 +144,6 @@ server {
|
||||
|
||||
client_max_body_size 50M;
|
||||
|
||||
# location /api/v1/pkg/config/setup {
|
||||
# proxy_pass http://u-api-service/api/v2_2/client/download/version;
|
||||
# }
|
||||
|
||||
location /api/v1/pkg/archive {
|
||||
proxy_pass http://u-api-service/api/v2_2/client/download/check;
|
||||
}
|
||||
@@ -152,18 +152,22 @@ server {
|
||||
proxy_pass http://u-api-service/api/v2_2/client/download/version;
|
||||
}
|
||||
|
||||
location /api/v1/version {
|
||||
proxy_pass http://u-api-service/api/v2_2/client/version;
|
||||
}
|
||||
|
||||
location /static/config/rc.json {
|
||||
proxy_pass http://u-api-service/api/v2_2/client/rc/json?os=win;
|
||||
}
|
||||
|
||||
location = /api/v1/version {
|
||||
proxy_pass http://hs-client-without-auth-server;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $proxy_protocol_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
# location = /api/v1/version {
|
||||
# proxy_pass http://hs-client-without-auth-server;
|
||||
# proxy_http_version 1.1;
|
||||
# proxy_set_header Host $host;
|
||||
# proxy_set_header X-Real-IP $proxy_protocol_addr;
|
||||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
# proxy_read_timeout 300s;
|
||||
# }
|
||||
|
||||
location /api/v1/pkg {
|
||||
proxy_pass http://hs-client-without-auth-server;
|
||||
|
||||
Reference in New Issue
Block a user