Parse it out for readability, and we have these results:
{
"level": "debug",
"ts": 1591841774.666237,
"logger": "http.handlers.reverse_proxy",
"msg": "upstream roundtrip",
"upstream": "ssw2.samaserv.link:443",
"request": {
"method": "GET",
"uri": "/",
"proto": "HTTP/2.0",
"remote_addr": "83.243.126.50:42278",
"host": "supersamaworld.com",
"headers": {
"User-Agent": [
"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
],
"Accept-Language": [
"fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3"
],
"Accept-Encoding": [
"gzip, deflate, br"
],
"Accept": [
"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
],
"Upgrade-Insecure-Requests": [
"1"
],
"Cache-Control": [
"max-age=0"
],
"Te": [
"trailers"
],
"X-Forwarded-For": [
"83.243.126.50"
],
"X-Forwarded-Proto": [
"https"
]
},
"tls": {
"resumed": true,
"version": 772,
"ciphersuite": 4865,
"proto": "h2",
"proto_mutual": true,
"server_name": "supersamaworld.com"
}
},
"headers": {
"Date": [
"Thu, 11 Jun 2020 02:16:14 GMT"
],
"Content-Type": [
"text/plain; charset=utf-8"
],
"Server": [
"Caddy"
],
"X-Content-Type-Options": [
"nosniff"
],
"Content-Length": [
"60"
]
},
"duration": 0.010033197,
"status": 421
}
{
"level": "debug",
"ts": 1591841774.7348788,
"logger": "http.handlers.reverse_proxy",
"msg": "upstream roundtrip",
"upstream": "ssw2.samaserv.link:443",
"request": {
"method": "GET",
"uri": "/",
"proto": "HTTP/2.0",
"remote_addr": "83.243.126.50:42280",
"host": "supersamaworld.com",
"headers": {
"Accept-Language": [
"fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3"
],
"Te": [
"trailers"
],
"X-Forwarded-For": [
"83.243.126.50"
],
"User-Agent": [
"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
],
"Accept": [
"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
],
"Accept-Encoding": [
"gzip, deflate, br"
],
"Upgrade-Insecure-Requests": [
"1"
],
"Cache-Control": [
"max-age=0"
],
"X-Forwarded-Proto": [
"https"
]
},
"tls": {
"resumed": true,
"version": 772,
"ciphersuite": 4865,
"proto": "h2",
"proto_mutual": true,
"server_name": "supersamaworld.com"
}
},
"headers": {
"Content-Type": [
"text/plain; charset=utf-8"
],
"Server": [
"Caddy"
],
"X-Content-Type-Options": [
"nosniff"
],
"Content-Length": [
"60"
],
"Date": [
"Thu, 11 Jun 2020 02:16:14 GMT"
]
},
"duration": 0.009985555,
"status": 421
}
So… curiously, Caddy is talking to an upstream Caddy server. The upstream Caddy server is issuing 421 responses. Hmm!
Anyway, that’s exactly the behaviour I’m seeing from your upstream server, too. The Caddy server you have configured to serve www.supersamaworld.com, supersamaworld.com
and reverse proxy to https://ssw2.samaserv.link
is working exactly as expected.
~/Projects/test
➜ curl -iLH "Host:supersamaworld.com" https://ssw2.samaserv.link
HTTP/2 421
content-type: text/plain; charset=utf-8
server: Caddy
x-content-type-options: nosniff
content-length: 60
date: Thu, 11 Jun 2020 02:27:27 GMT
421 Site supersamaworld.com is not served on this interface