Make sure to bind your server to 0.0.0.0:8080
instead of localhost:8080
.
localhost
always resolves to the loopback interface, which is only reachable from the same host.
0.0.0.0
on the other hand means "all interfaces" (also known as INADDR_ANY
).
For details read up about INADDR_LOOPBACK
and INADDR_ANY
in the ip(7)
manpage.