vagrantubuntu-14.10

In host machine, cannot connect webserver, vagrant


I am running ubuntu 14.10 through vagrant

host machine is windows 8.1

In host machine (windows 8.1),

  1. I can send ICMP message to guest:ubuntu
  2. I can connect ssh to guest:ubuntu, for portforwarding - In windows, localhost:2222
  3. But only cannot connect to webserver of ubuntu, localhost:3000 or 4000 or anyport just showed ERR_CONNECTION_REFUSED

of course, portforwarding is done

actually, In ubuntu, I can connect webserver for

lynx localhost:3000

but in windows, I can't connect only webserver. ssh, icmp are works. Really, I can't understand why it doesn't work. sombody help me


Solution

  • solution is running with code below when start server.

    rails s -b 0.0.0.0
    

    I found this soulution from other post about same problem The answerer said 'You'll want to make sure that the server is bound to 0.0.0.0 so that all interfaces can access it."

    I hope this post help people who meet with the same problem :)