I have a golang web server. I use fiber freamwork in this project. I am trying to get certification from let's encrypt. I deployed my project with docker, and published it, but when i trying to connect my website, browser says "This site cannot provide a secure connection". Here are my golang codes:
certManager := autocert.Manager{
Prompt: autocert.AcceptTOS,
HostPolicy: autocert.HostWhitelist("oguzhanguler.dev", "www.oguzhanguler.dev"),
Cache: autocert.DirCache("certs"),
}
TLSConfig := &tls.Config{
GetCertificate: certManager.GetCertificate,
}
listener, _ := net.Listen("tcp", ":443")
listener = tls.NewListener(listener, TLSConfig)
app.Listener(listener)
After published the project, i get into docker container. I can see the "cert" file is created. Do you have any idea why i am encountered with this problem? Also here is the my docker container's inside :
inside of cers folder is : https://i.ibb.co/prDrkbW/certs.png
my app looks like have no problem at all and running : https://i.ibb.co/ZJH8y0v/uygulama.png
My domain is: oguzhanguler.dev
The operating system my web server runs on is (include version): alpine linux
My hosting provider: digitalocean
I can login to a root shell on my machine (yes or no, or I don't know): yes
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot):