Caddy Version: v2.4.6
How I run Caddy: With caddy reload? on Ubuntu server 20.04
I am editing and configuring caddy with this command:
caddy reload --config /etc/caddy/Caddyfile
My complete Caddyfile or JSON config:
Testing
{
auto_https off
}
http://localhost {
reverse_proxy 192.168.1.11:80
}
Production
{
auto_https off
}
http://subdomain.localhost {
reverse_proxy 192.168.1.11:80
}
Currently, I am trying to use a dynamic dns, eg subdomain.ddns.net, and be able to host multiple services on my homelab at multiple subdomains such as service1.subdomain.ddns.net. I’m currently forwarding the 80 port directly to my Caddy vm. However, when I tried with the “testing” config file, I get an ERR_SSL_PROTOCOL_ERROR when typing in the domain of the caddy machine. The production config also doesn’t work. Currently, I’m trying with one service, hosted in the container 192.168.1.11 at port 80, Gitlab. Accessing directly at 192.168.1.11 works, but with caddy, it doesn’t work, even when I don’t have a subdomain.
Any idea why this setup isn’t working?
Apologies for the beginner/basic questions, I’m still new to setting up reverse proxies.