dongwang788787 2016-09-09 00:37
浏览 16

让我们加密并进行

I currently have my letsencrypt certs set up for my domain www.example.com and example.com

When I open my server https://www.example.com works perfectly BUT https://example.com will give me

ERR_CONNECTION_REFUSED

I am doing the server the following way

if err := http.ListenAndServeTLS(
    ":443",
    "domain-crt.pem",
    "domain-key.pem",
    Route.router,
); err != nil {
    ERROR.Fatal(err)
}

This gives me no errors and with the www the website works fine. The .pem files are not encrypted and the ListenAndServeTLS doesn't return any error.

  • 写回答

1条回答 默认 最新

  • douzhiji2020 2016-09-09 01:12
    关注

    This as told in the comments was a DNS error caused by using URL REDIRECT record

    I simply added an A record pointint @ to my IP and the same for www

    评论

报告相同问题?