Ok so take the caddy json below:
{
"apps": {
"http": {
"servers": {
"srv0": {
"experimental_http3": true,
"listen": [
":443"
],
"routes": [
{
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "reverse_proxy",
"transport": {
"keep_alive": {
"idle_timeout": 1000000000
},
"protocol": "http",
"tls": {
"server_name": "killergaming-serverautomation-dev.gssira.com"
}
},
"upstreams": [
{
"dial": "192.168.3.129:443"
}
]
}
]
}
]
}
],
"match": [
{
"host": [
"killergaming-serverautomation-dev.gssira.com"
]
}
],
"terminal": true
}
]
}
}
},
"tls": {
"automation": {
"policies": [
{
"issuers": [
{
"challenges": {
"dns": {
"provider": {
"api_token": "VqljlYA_iccSJluIhz3WGdS6gIngsvF-BUgY1KsL",
"name": "cloudflare"
}
}
},
"email": "gurdip.sira@gmail.com",
"module": "acme"
},
{
"challenges": {
"dns": {
"provider": {
"api_token": "abc",
"name": "cloudflare"
}
}
},
"email": "abc",
"module": "zerossl"
}
],
"subjects": [
"killergaming-serverautomation-dev.gssira.com"
]
}
]
}
}
},
"logging": {
"logs": {
"default": {
"level": "DEBUG"
}
}
}
}
I have crossed out a few sensitive details.
However, going forward I am going to have further sites to load balance. Eg, b.gssira.com, c.gssira.com, etc. They will have the same upstreams (IIS servers), as they are production sites.
I will also have the equivalent sites for dev and uat environments, with their own set of 2-3 backend servers.
From the documentation to patch the configuration, I want to remove an upstream that belongs to one url only, and not remove that upstream for ALL urls using it.
The following url will get me the upstream: http://localhost:2019/config/apps/http/servers/srv0/routes/0/handle/0/routes/0/handle/0/upstreams/0/dial
However, in that url, nowhere do I say I am interested in the upstreams for ONLY site “a.gssira.com”. This is what I’d like to do.