Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I setup virtualbox running debian for website development inside of Windows 7. Can I access that webserver running inside the VM from Windows 7? I tried going to 127.0.0.1 and FF said there's no server, so it looks like it's not running automatically.

share|improve this question

3 Answers 3

up vote 4 down vote accepted

You need to put the VM in bridged mode for networking, then you can treat it like any other computer on your network. 127.0.0.1 is the loopback for your host machine, not the VM. You will need to go to the unique IP of the VM.

share|improve this answer

127.0.0.1 is the "loopback" address that will access a server on the same machine. That is, an application on your Windows 7 host could access a DB server on the Windows 7 host by that address. Or an application running on the Debian guest could access a DB server running on the Debian guest using that IP address. You need the app to connect to the DB on a different machine so the loopback connection isn't going to work.

If you're going from the Windows 7 host to the Debian guest VM then you are for all intents and purposes connecting to a different machine, so you need to specify whatever IP address the Debian guest has been assigned on your network.

Step 1: First make sure that the Debian guest is in fact connecting to the network properly, which is what MarkM suggested in his post about putting the VM in bridged mode for networking.

Step 2: Once you've confirmed that the Debian guest is properly connecting to the network, find out what IP address is assigned to it. To get this you can run the appropriate utility on debian command line (ifconfig) and find the ip address assigned, which will probably be something like 192.168.x.x. That's the address you can then use to connect to the DB server running on the Debian VM.

share|improve this answer

If you need the guest network adapters in NAT mode for any particular reason (often for internet access) you may need to follow the instructions here: http://mydebian.blogdns.org/?p=148. Just adapt the ports for your HTTPd.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.