2

im very new to the server world and trying to follow a book which i should be learning about Magento with but it describes a way of setting up a virtual machine using oracles Virtualbox and installing a lamp stack, so i thought id give it a go.

This is the book: Magento PHP Developers Guide

Anyway, i have downloaded the latest virtual box. Downloaded Ubuntu Server 12.04.4 (closest i could find to match the book, it wanted 12.04.2)

In the network settings of the virtual machine i created in virtualbox i selected adapter2 to be a bridged connection as is states in the book. (adapter1 is still NAT)

Then i installed ubuntu, ran apt-get update and then ran apt-get install apache2 -y Just like the book says.

It then goes on to say to reach the apache server from my host machine i can access it via a browser on 192.168.36.1 and i should see the default It Works! apache message.

Instead i get a server taking too long page show up(firefox) i.e it cant find it/not responding.

So i resarted apache so i know it was working. and pinged 192.168.36.1, but got no response.

Next i went into my hosts (win8.1) command prompt ran ipconfig to see what comes up.

I see this:

    Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::85f3:fbf1:fecf:dd64%3
   IPv4 Address. . . . . . . . . . . : 192.168.0.2
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.0.1

Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::385e:d717:2764:e664%8
   IPv4 Address. . . . . . . . . . . : 192.168.56.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Tunnel adapter isatap.{6C534165-D467-4841-8E84-F4E0AA7A7BC8}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter isatap.{84F5D90F-A2CB-4B4F-9962-052A80DD511E}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

So i can see the virtual-box hostonly ip address. I tried this ip and it pinged ok and i can ping back and forth from guest to host.

My questions:

1) when i try to access the host-only ip address shown above in a browser all i get is a totally blank page, why am i not seeing the apache - It Works?

2) if im using a bridged connection, why is the only a host-only ip in my ipconfig shown above when i didnt select host-only in my virtualbox setting?

Thanks

EDIT

Here is the output of the guest IFCONFIG as suggested below. enter image description here

0

1 Answer 1

0

1) when i try to access the host-only ip address shown above in a browser all i get is a totally blank page, why am i not seeing the apache - It Works?

Because the Host-Only network address is an address on your Windows 8.1 host computer. I suspect it's there as part of the VirtualBox install, ready in case you have a virtual machine with host-only networking.

You can ping it from your host computer becasue it is pinging itself. You cannot see an Apache page because your host is not running Apache.

Although if I'm right about this, you must be running a web server of some kind on your host computer - are you?

2) if im using a bridged connection, why is the only a host-only ip in my ipconfig shown above when i didnt select host-only in my virtualbox setting?

When you bridge the connection, your guest will be "live on your network", the host won't have a networking configuration for it. You need to run "ifconfig" inside Ubuntu, or look in a Network Connection Manager, and see what IP address Ubuntu has picked up.

It will probably be 192.168.0.{something}. Then try connecting to that in your browser.

3
  • Hi thnaks for the answer, no im not running apache on my host PC, and when i run ifconfig i get the localhost, and an eth0 with the address of 10.0.2.15 and thats it, but the 10.0.2.15 doesnt work either. I get no other IP addresses. Thanks
    – Tom Burman
    Jul 26, 2014 at 8:54
  • It sounds like 10.0.2.15 is the NAT interface, and the bridge interface is not getting an IP address - probably because only the first interface has been configured. Why do you want two Network interfaces on the VM though? Sounds like it would be enough with one in bridged mode.
    – Per von Zweigbergk
    Jul 26, 2014 at 11:25
  • I was simple following the instructions in the book my friend. I understand that the NAT connection gives me internet connection from the guest and the bridged connection is so my guest and host can connect to each other.
    – Tom Burman
    Jul 27, 2014 at 8:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .