mardi 25 octobre 2016

golang ListenAndServe port :80

i started learning go but when i'm trying this code

http.ListenAndServe(":80", nil)

it gives error so i checked

err := http.ListenAndServe(":80", nil)
if err != nil {
  log.Fatal("ListenAndServe: ", err)
  fmt.Printf("ListenAndServe:%s\n", err.Error())
}

listen tcp :80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

and i also want to know how can i serve my ip like http.ListenAndServe("10.12.66.91:80", nil)




Aucun commentaire:

Enregistrer un commentaire