This commit is contained in:
eson 2023-08-21 16:03:13 +08:00
parent a23edd3e7b
commit 7eda3cdd51

View File

@ -117,17 +117,19 @@ func main() {
ServerAddress := ":9900"
log.Println("listen on ", ServerAddress)
keydata, err := os.ReadFile("/opt/server.fusen.3718.cn.key")
if err != nil {
panic(err)
}
cert := "/opt/server.fusen.3718.cn.pem"
key := "/opt/server.fusen.3718.cn.key"
// keydata, err := os.ReadFile("/opt/server.fusen.3718.cn.key")
// if err != nil {
// panic(err)
// }
pemdata, err := os.ReadFile("/opt/server.fusen.3718.cn.pem")
if err != nil {
panic(err)
}
// pemdata, err := os.ReadFile("/opt/server.fusen.3718.cn.pem")
// if err != nil {
// panic(err)
// }
log.Fatal(http.ListenAndServeTLS(ServerAddress, string(pemdata), string(keydata), mux))
log.Fatal(http.ListenAndServeTLS(ServerAddress, cert, key, mux))
}
// 后端服务的类型