2024-01-12 04:14:09 -06:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
func https() {
|
2024-01-12 12:26:05 -06:00
|
|
|
// http.HandleFunc("/", okHandler)
|
2024-01-12 04:14:09 -06:00
|
|
|
|
2024-01-12 12:26:05 -06:00
|
|
|
certPath := "/etc/letsencrypt/live/go.wit.com/fullchain.pem"
|
|
|
|
keyPath := "/etc/letsencrypt/live/go.wit.com/privkey.pem"
|
2024-01-12 04:14:09 -06:00
|
|
|
|
|
|
|
err := http.ListenAndServeTLS(":443", certPath, keyPath, nil)
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println("Error starting HTTPS server:", err)
|
|
|
|
}
|
|
|
|
}
|