FAQ
I am using Let's Encrypt.

/Users/UserName/.local/share/letsencrypt/bin/letsencrypt --duplicate
certonly -a manual --rsa-key-size 4096 -d MyDomain01.net -d
www.MyDomain01.net -d MyDomain02.net -d www.MyDomain02.net

That way I have multi domain certificate.

I think this will solve the certificate issue.


Now there is an issue with http to https redirection.

I am using this:


go func() {

http.ListenAndServe(":80", http.HandlerFunc(redir))

}()
func redir(w http.ResponseWriter, r *http.Request) {

if r.Host == "MyDomain01.net" || r.Host == "www.MyDomain01.net" {
http.Redirect(w, r, "https://"+"www.MyDomain01.net"+r.RequestURI,
http.StatusMovedPermanently)
} else if r.Host == "MyDomain02.net" || r.Host == "www.MyDomain02.net" {
http.Redirect(w, r, "https://"+"www.MyDomain02.net"+r.RequestURI,
http.StatusMovedPermanently)
}

}
It redirects but In the browser address bar I don't always see the lock
icon.


On Friday, April 8, 2016 at 6:32:54 PM UTC-7, Matt Silverlock wrote:

Configure the GetCertificate field of tls.Config with a function that uses
the provided ClientHelloInfo's ServerName field to determine the cert <=>
hostname pairing: https://golang.org/pkg/crypto/tls/#Config
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedApr 8, '16 at 4:47p
activeApr 9, '16 at 1:57a
posts3
users2
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase