From 4bc92ccddd52c0a7454247cb226ce085e62394e8 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 29 Jun 2025 21:15:29 -0500 Subject: initial start after split from gowebd --- https.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 https.go (limited to 'https.go') diff --git a/https.go b/https.go new file mode 100644 index 0000000..00fca19 --- /dev/null +++ b/https.go @@ -0,0 +1,18 @@ +package main + +import ( + "fmt" + "net/http" +) + +func https() { + // http.HandleFunc("/", okHandler) + + 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 { + fmt.Println("Error starting HTTPS server:", err) + } +} -- cgit v1.2.3