Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net: Listen on ":80" does not serve from the machines IP address on windows #17467
What version of Go are you using (
I have specifically allowed it in the firewall even though I am testing on the same physical machine. It makes no difference.
I can see no specific mention of it in my antivirus settings and would have no reason to suspect that as it will serve it up via the normal machine ip address but only if I specify it fully.
http.ListenAndServe(":80", mux) only works on local host
changed the title
ListenAndServer using ":80" does not serve from the machines IP address on windows.
Oct 16, 2016
If you say this works fine for port 8080 on your machine, but not port 80, then it sounds like something on your machine (firewall, anti-virus, as @minux suggested) is messing with you.
I'm pretty sure we already have unit tests for exactly this behavior, but if somebody wants to trybot a unit test in the
/cc @odeke-em who might be interested.
Have you already tried to run "netstat -oan" before running your application?
I'm not a Windows user and have no Windows box, but when googling "windows+listen+port+80", I can see many articles such as "port 80 is used by system process." Seems like golang-nats or Stack Overflow is the best place for asking questions.