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
1 changed files with 5 additions and 1 deletions

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)
}