Answer the question
In order to leave comments, you need to log in
How did the server respond to go when entering a subdomain?
There is a helloworld server in golang and vds with vestaCP on it.
package main
import (
"fmt"
"net/http"
)
type msg string
func (m msg) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
fmt.Fprint(resp, m)
}
func main() {
msgHandler := msg("Hello from Web Server in Go")
fmt.Println("Server is listening...")
http.ListenAndServe(":8181", msgHandler)
}
Answer the question
In order to leave comments, you need to log in
The server on Go has nothing to do with it. Proxy traffic to port 8181 on nginx.
To study - official documentation and articles like this one
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question