I’m using caddy to proxy traffic to virtual machines, I use the following scheme:
subdomain.mysite.org {
proxy / firstvm:80 {
transparent
}
}
This works in most cases. However with some docker containers I get “The page isn’t redirecting properly” in the browser ( ERR_TOO_MANY_REDIRECTS).
I also installed yunohost on a virtual machine, and get the same problem.
For quite some time, I was thinking the problem may come from the containers or yunohost, but I finally setup ports forwarding to bypass caddy (getting the request from a custom port and forwarding it directly to the vm, and I can access yunohost via this custom port).
I guess the issue may come from the fact that caddy is automatically making https and maybe those services are not designed for that. I don’t know.
I also tried to redirect to port 443 in the config, instead of 80, or to make different section for http and https, like this:
http://subdomain.mysite.org {
proxy / firstvm:80 {
transparent
}
}
https://subdomain.mysite.org {
proxy / firstvm:443 {
transparent
}
}
but I end up getting this error 400: “The plain HTTP request was sent to HTTPS port”.
I wonder if there is any way I could configure caddy for those services to be reachable, or to bypass it for those services, and let them create their ssl certificates themselves.