Weird SSL Handshake issue

1. The problem I’m having:

So basically I have caddy setup serving a static site, in my dns records I have both and pointing to my server. However if I access, I get an SSL HANDSHAKE FAILED error but when I access I can access my website fine. Not sure whats going on, any help would be appreciated.

2. Error messages and/or full log output:

Unable to get logs since I ran caddy using caddy start

3. Caddy version:


4. How I installed and ran Caddy:

sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf '' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf '' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy

a. System environment:

Ubuntu 22.04 LTS arm64 24GB RAM

b. Command:

sudo caddy start

d. My complete Caddy config: {
        root * /var/www/html

        handle_errors {
                rewrite * /{http.error.status_code}.html
} and are two different sites. You only defined in the Caddyfile. If you want to serve as well, you need to add the corresponding configuration to the Caddyfile.