2

I'm using ubuntu server as a VM on my mac, its address is 10. 211. 55. 11

i just installed django server, and it started on the localhost of 127. 0. 0. 1: 8000 (this ubuntu is originally a rails turnkey, which in the hosts file have these two lines, not sure if it has anything to do with it.

127. 0. 1. 1 rails
127. 0. 0. 1 localhost

now i try to browse the server from my mac with 10. 211. 55. 11: 8000 but dosen't work.

does anyone know how to do it.

  • Probably a firewall issue. Is the VM allowed to send and receive traffic? – Pekka Sep 18 '11 at 12:47
  • You should make sure the django server listens on 10.211.55.11, the loopback on your ubuntu vm is completely different from loopback on your Mac. – nos Sep 18 '11 at 12:50
  • @nos, how to make it to listen to the loop? any guides? probably that is the issue, since the server dosen't receive any commands as the rails do when i access it from the browser. –  Sep 18 '11 at 12:51

1 Answers1

0

Make sure the VM is in the correct networking mode; Bridged will likely work best for you.

http://en.kioskea.net/faq/1166-vmware-and-virtualbox-the-different-modes-of-vmware-network

Second when you run your django server, run it with:

manage.py runserver 0.0.0.0:8000

This will ensure it runs on all interfaces.

funkotron
  • 116
  • 2
  • got it!! @nos enlightened me, so is funkotron, basically i just need to runserver with a different port, in this case i used :90, since the :80 is used by rails. thanks ppz this is the anser: runserver 0.0.0.0:90 #to listen to all ports on :90 –  Sep 18 '11 at 13:03