Caddy listening port 2015 not 443

I used sslforfree.com to create wildcard certificate,everything is ok.

First my Caddyfile like this :

my.site {
tls cert key
}
sub.my.site {
tls caert key
}

SSH : caddy 1603 root 5u IPv6 16579 0t0 TCP *:2015 (LISTEN)

Then caddy listening port 2015 not 443,i must add “:2015” at the end of url to visit normally.

So i modify Caddyfile like this :

my.site:443 {
tls caert key
}

sub.my.site:443 {
tls cert key
}

SSH :caddy 1963 root 5u IPv6 17701 0t0 TCP *:https (LISTEN)

Now i can visit all my.site without “:2015”,and caddy listening https.

Before I use the wildcard certificate,caddy listening http 80 https 443.

So,Which step am I doing wrong ? Forgive me,my english is very poor.:sob:

I’m not sure what you problem is, but you don’t need to use that website to create certificates. Just let caddy manage them for you.

try:

my.site {
tls your@email.com
}

2 Likes

Hi @1v9,

Port 2015 is Caddy’s default port for serving sites. When Caddy manages TLS for you, it instead serves sites on ports 80 and 443 automatically. It’s not possible for Caddy to manage a third party certificate, so by providing one, you’ve disabled Automatic HTTPS.

More detail about what Automatic HTTPS does, and what qualifies, can be found at the docs page: Automatic HTTPS — Caddy Documentation


My strong recommendation is to let Caddy manage your certificates instead of getting one from a website. As of a very recent update, Caddy can also provision wildcard certificates automatically. Automatic HTTPS — Caddy Documentation

1 Like

Thanks,you answered my confusion:slightly_smiling_face:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.