Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Windows XP as guest OS on VirtualBox running on Ubuntu. Inside that Guest Windows XP, I have an instance of Apache running. Now I want to connect to that Apache from the host (Ubuntu). Is it possible? How can I do that?

share|improve this question
    
Also I want the guest OS to continue to share the internet connection with the host OS. –  Phuong Nguyen Feb 7 '10 at 14:47
add comment

2 Answers

up vote 6 down vote accepted

Change the guests's network adapter settings to 'bridged' and it will get an IP address just like any other machine on your internal network. You can then communicate with it as if it were a physical machine.

share|improve this answer
    
Note that you may also connect to this machine from any other as well. If you don't want that functionality, you can use firewalling. –  Nerdfest Feb 7 '10 at 16:39
add comment

If your VirtualBox network is set to NAT, you are able to make the connection from your host by configuring the guest from the commandline using something along the lines of

VBoxManage setextradata <GUEST_NAME> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/HTTP/HostPort" 8080
VBoxManage setextradata <GUEST_NAME> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/HTTP/GuestPort" 80
VBoxManage setextradata <GUEST_NAME> "VBoxInternal/Devices/pcnet/0/LUN#0/Config/HTTP/Protocol" TCP

and then connecting in your browser to http://localhost:8080

share|improve this answer
add comment

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.