I have another service listening at port 80 and wish to keep Caddy 2 away from port 80 completely.
I did my Caddyfile as such:
caddy.com:443 {
tls /etc/certs/caddy.crt /etc/certs/caddy.key
reverse_proxy /caddy 127.0.0.1:8443 {
transport http {
tls
}
}
}
This did not disable automatic HTTP->HTTPS redirects it seems, the log reads:
INFO http enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}
How can I keep Caddy 2 away from port 80 completely?
Currently you can customize the automatic HTTPS using JSON: https://caddyserver.com/docs/json/apps/http/servers/automatic_https/ -- set the disable_redirects
property to true
.
Hope that helps!
Will it be possible to do this in a normal Caddyfile in the future?
Most helpful comment
Will it be possible to do this in a normal Caddyfile in the future?