Add cert and key file to ListenAndServerTLS().

This commit is contained in:
Marco 2022-12-18 02:49:10 +01:00
parent 890cb4a2c4
commit a727108c82

View File

@ -6,11 +6,15 @@ import (
"net/http"
)
var cert_path = "/etc/letsencrypt/live/chess.sw-gross.de/"
var cert_file = cert_path + "fullchain.pem"
var key_file = cert_path + "privkey.pem"
func main() {
http.HandleFunc("/", server.SocketHandler)
err := http.ListenAndServeTLS("wogehtspam.:8080", "path_to_cert_file", "path_to_key_file", nil)
err := http.ListenAndServeTLS("wogehtspam.:8080", cert_file, key_file, nil)
if err != nil {
log.Println(err)
}