Trying to setup up reverse proxy with caddy on fly.io, also upstream provided a certificate.
wants to fly to manage certifications, but not sure if i’m doing this right.
my caddy file look like
{
debug
auto_https off
servers {
listener_wrappers {
proxy_protocol
tls
}
}
}
:443 {
log {
level ERROR
output stderr
}
tls {
ca_root /etc/caddy/eternal-domain-proxy.cer
}
reverse_proxy https://proxy.externaldomain.com {
health_timeout 5s
}
}
fly config looks like
[[services]]
protocol = "tcp"
internal_port = 80
[[services.ports]]
port = 80
handlers = ["proxy_proto"]
[services.concurrency]
type = "connections"
hard_limit = 150
soft_limit = 100
[[services.tcp_checks]]
interval = "15s"
timeout = "2s"
grace_period = "1s"
restart_limit = 0
[[services]]
protocol = "tcp"
internal_port = 443
[[services.ports]]
port = 443
handlers = ["proxy_proto"]
[services.concurrency]
type = "connections"
hard_limit = 150
soft_limit = 100
[[services.tcp_checks]]
interval = "15s"
timeout = "2s"
grace_period = "1s"
restart_limit = 0
tried many solutions , but somehow these feels like i’m close… tbh i’m really not sure what i’m doing.
error
Health check on port 80 has failed. Your app is not responding properly. Services exposed on ports [80] will have intermittent failures until the health check passes.