Add cert and key file to ListenAndServerTLS().
This commit is contained in:
parent
890cb4a2c4
commit
a727108c82
6
main.go
6
main.go
@ -6,11 +6,15 @@ import (
|
|||||||
"net/http"
|
"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() {
|
func main() {
|
||||||
|
|
||||||
http.HandleFunc("/", server.SocketHandler)
|
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 {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user