diff --git a/https.go b/https.go index 33a1099..00fca19 100644 --- a/https.go +++ b/https.go @@ -6,10 +6,10 @@ import ( ) func https() { - http.HandleFunc("/", okHandler) + // http.HandleFunc("/", okHandler) - certPath := "/etc/letsencrypt/live/yourdomain.com/fullchain.pem" - keyPath := "/etc/letsencrypt/live/yourdomain.com/privkey.pem" + certPath := "/etc/letsencrypt/live/go.wit.com/fullchain.pem" + keyPath := "/etc/letsencrypt/live/go.wit.com/privkey.pem" err := http.ListenAndServeTLS(":443", certPath, keyPath, nil) if err != nil { diff --git a/indexHtml.go b/indexHtml.go new file mode 100644 index 0000000..5af15bf --- /dev/null +++ b/indexHtml.go @@ -0,0 +1,253 @@ +package main + +import ( + "fmt" + "net/http" +) + +/* +func indexHtml(w http.ResponseWriter) { + realurl = "https://" + realurl + + log.Info("go repo =", gourl, "real url =", realurl) + fmt.Fprintln(w, "") + fmt.Fprintln(w, "") + fmt.Fprintln(w, "
") + // fmt.Fprintln(w, + fmt.Fprintln(w, "") + fmt.Fprintln(w, "") + + fmt.Fprintln(w, "") + fmt.Fprintln(w, "") + fmt.Fprintln(w, "") + fmt.Fprintln(w, "Nothing to see here. Please move along.\"") + fmt.Fprintln(w, "") + fmt.Fprintln(w, "") +} +*/ + +/* + indexHeader(w) + indexBodyStart(w) + indexBodyEnd(w) +*/ + +func indexHeader(w http.ResponseWriter) { + fmt.Fprintln(w, "") + fmt.Fprintln(w, "") + fmt.Fprintln(w, " ") + fmt.Fprintln(w, " ") + fmt.Fprintln(w, " ") + fmt.Fprintln(w, " ") + fmt.Fprintln(w, "") +} + +func indexBodyStart(w http.ResponseWriter) { + // fmt.Fprintln(w, " + fmt.Fprintln(w, " ") + fmt.Fprintln(w, "Package | ") + fmt.Fprintln(w, "go get | ") + fmt.Fprintln(w, "Authoritative sources (IPv6 only) | ") + fmt.Fprintln(w, "github mirror | ") + fmt.Fprintln(w, "Documentation | ") + fmt.Fprintln(w, "
---|