0

hey, i have a virtualbox with a guest install on it windows 2008 r2 server where i put my web site
and i can ping both side, from main to virtual machine, and from mv to host but the problem is when
i try to tape in browser the ip adresse of VM its says web page inaccessible web page,
host Ip: 192.168.1.38
guestIp: 192.168.1.83
thx

3
Contributors
8
Replies
39
Views
2 Years
Discussion Span
Last Post by veedeoo
0

on your hosts file on the host machine give it a directives as IP of the virtual machine e.g

xxx.xxx.x.xx alias or domain name of the server in the virtual machine

if that does not work, read my other response on the other thread you have posted a while ago.

0

Did you first verify that the page opens as expected when you try from the guest itself so you can rule out a problem with the web server/site.

0

Ok that's good. Assuming that you do have network connectivity between host and guest on the same subnet, are you also sure you aren't running a stand-alone firewall on the server?

1

Per your message, why windows 2008 with WAMP on virtual machine ?
why not linux with LAMPP, if this is going to serve web contents?

besides if you are using VM Virtual Box, it does allow you to install different os's. So, if you really need to have a windows 2008, then install it in different virtual drive, and then install the linux e.g. ubuntu, redhat, fedora, or whatever is more easier for you to work on.

The scenario that I am imagining right now is that

you have windows os as host opereating system ?
you have a virtual box installed in this os?

Here is an example with screenshot just to make points a lot simpler to understand.

Host computer OS: Windows : IP address by way of ipconfig : 1xx.xxx.x.xxx

Guest : Virtual Box with multi-operating system. ifconfig shown on ubuntu terminal : ifconfig 2xx.xxx.x.xxx

let say we have defined our development domain as development.dev which is hosted inside the virtual box by ubuntu server and the windows/system32/etc/hosts has these entries to make sure every http request for development.dev gets forwarded to the ubuntu server in the virtual box 2xx.xxx.x.xxx

the host computer host file entry

2xx.xxx.x.xxx development.dev

The idea is to be able to ping the ubuntu server in the virtual box. All browser request to development.dev will be serve by the apache2 in the ubuntu server inside the virtual box.

Below is the screenshot of a virtual box with ubuntu server

f3bb80796ec7ca09a5aa6fa5e0900212

I also set the network adapter attached to bridged Adapter . NO it will not work on NAT or whatever the school thought you. Those are just theories they wrote some years ago.. If you want to prove me wrong try running it on Cisco Packet Tracer and you will find the error on the network connection on the guest not able to access the world wide web.

883c0a5cd32aa6d5c15aaa73158164fc

Let say you successfully installed the apache2, mysql, PHP on the ubuntu server in the virtual box. You can ping the the host computer by

ping 1xx.xxx.x.xxx

You can also ping the ubuntu server like this

ping development.dev

it should give you something like the screenshot from the virtual box view

294018b8164f723a64a428abe34ea78c

the same is true with the host pinging the ubuntu server in the virtual box

1031bf3bfce0183dfb5fbc008cb52beb

Please ignore the Ruby Command Prompt. It just happened that I am writing codes in Ruby today, it would have the same result even if we run it on windows command prompt.

If the above does not work, then you must set your port forwarding if allowed or present as an option on your network configuration. The host computer can serve the http request. Below is the screenshot of a cisco network

36b2c8e9974080c6fd1d7d36b0f9bb25

Yesterday, I talked about nginx and uniform server. Since, my response in this thread is more focused on virtual box and ubuntu server. The ubuntu server can serve the entire http request inside the virtual box and then allow the nginx run in the host computer.

below is a simple configuration for effeciency and isolation of the web server in a virtual space (should not be taken literally, but rather the principles of isolating external accessability).

9440172797e2b8bfaf907950edbccca8

Edited by veedeoo: more info added

1

here are the screenshots of the server in the virtual box being access by firefox in the host computer

8eaff26fa3d646e0b4b73deb4065653d

Just for the purpose of this discussion, I skinned the ubuntu server with Lubuntu skin and installed the firefox as well so that I can take screenshot of the localhost inside the virtual box.

4acb92ab0acbec42518d90acbc4a4888

I hope you will be able reproduce everything we presented on this thread. I am confident we have already given you enough information on how to set your server andnetwork settings on the virtual server and host computer. What we did not give is the instruction on how to install apache2 on the virtual server. However, I sincerely believe that there is an abundance of tutorials available on the web. If you ever find any problems installing apache, mysql, php on linux, please free to start a new thread.

Good luck....

Edited by veedeoo: more info added

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.