“Go Language” HomePage at: https://go.dev/ (WAS: golang.org/)
https://vk.com/wall341179603_5279
package main import( "net/http" "fmt" "log" ) func main() { // handle `/` route http.HandleFunc( "/", func( res http.ResponseWriter, req *http.Request ) { fmt.Fprint( res, "Hello World! (from GoLang's net/http)" ) } ) // run server on port 443=https 80=http // your DNS domain is not netop.info so change below accordingly // these 2 files were generated by certbot // https://golang.org/pkg/net/http/#ListenAndServeTLS certFile:="/etc/letsencrypt/live/netop.info/fullchain.pem" keyFile:="/etc/letsencrypt/live/netop.info/privkey.pem" serverError:=http.ListenAndServeTLS(":443", certFile, keyFile, nil) log.Fatal(serverError) }
curl https://netop.info
https://netop.info
Lascia un commento
Devi essere connesso per inviare un commento.