Auto SSL problem without explicit https://

(pwFoo) #1

I have a caddyfile with a subdomain like “” it should be running with (auto-)TLS.

It is served HTTP only.
If I add prefix schema “https://” it works fine with auto TLS + LE cert.

Why I have to add schema? caddy is started with -port 80 and can bind to 80 and 443. That works fine if I add https:// scheme. So it looks like a caddyfile / caddy problem? {
    proxy / <IP>:<PORT> {

    # log files
    log / stdout "{remote} - {user} [{when}] \"{method} {scheme}://{host}{uri} {proto}\" {status} {size} \"{>Referer}\" \"{>User-Agent}\""
    errors stdout


Any idea?

# caddy -version
Caddy 0.10.10 (+1125a23 Thu Nov 23 14:50:45 UTC 2017) (unofficial)

(Matthew Fay) #2

Nothing in the Caddyfile indicates it should be HTTP-only.

Maybe try without -port 80? I didn’t think it would stop Automatic HTTPS, but it’s the only thing I can see here that’s unusual.

(pwFoo) #3

I think -port 80 is needed because the default port is 2015 instead of 80 (http)? Caddy should listen to 80 and 443 because it’s used as reverse proxy.

I’ll test it soon, because I’m away at the moment.

(Matthew Fay) #4

If your site is eligible for Automatic HTTPS, it will be served on ports 80 and 443 by default.