After a couple retries, I realized I have restarted my server too much with Docker. I had Volume setup but I had dropped the volume so many times that I ended up getting rate limit exceeded with letsencrypt. This was not good as my website has been down for a day now.
In desperate times, I created my own SSL certs with Namecheap from comodo.com.
I followed the instructions and did
openssl req -new -newkey rsa:2048 -nodes -keyout clashleaders_com.key -out clashleaders_com.csr
I submitted those to namecheap.com and received a zip file via email. My zip file had
www_clashleaders_com.ca-bundle www_clashleaders_com.crt www_clashleaders_com.p7b
So far good.
I created a bundle doing
cat www_clashleaders_com.crt www_clashleaders_com.ca-bundle > ssl-bundle.crt
And changed my Caddyfile to
tls /etc/caddy/ssl-bundle.crt /etc/caddy/clashleaders_com.key
I get this error
/etc/Caddyfile:4 - Error during parsing: Unable to load certificate and key files for ‘https://www.clashleaders.com’: tls: private key does not match public key
I have tried using crt file. I have no idea what is wrong. I do not know what else to try. At the risk of my website not being down, I am desperate. What am I doing wrong?