Web Server Access on a VirtualBox Guest
2011-07-26 11:27
381 查看
Web Server Access on a VirtualBox Guest
In: Computing 数码编程7Oct2008I been using VirtualBox to deploy virtual machines on my Windowsmachine since a significant memory upgrade. VirtualBox is suprisinglyeasy to used if compared to VMWare and it just fit to my basic needs.Access the web server from the guest on host is pretty straightforward but not the other way.
In my scenario, my host OS is XP and the guest OS is Ubuntu. First,we go to the XP host and open a command prompt, and configure the portforwarding in the VirtualBox installation directory, as follows:
cd C:/Program Files/Sun/xVM VirtualBox VBoxManage setextradata MyUbuntu "VBoxInternal/Devices/pcnet/0 /LUN#0 /Config/apache/HostPort" 8888 VBoxManage setextradata MyUbuntu "VBoxInternal/Devices/pcnet/0 /LUN#0 /Config/apache/GuestPort" 80 VBoxManage setextradata MyUbuntu "VBoxInternal/Devices/pcnet/0 /LUN#0 /Config/apache/Protocol" TCPThis simply arbitrarily assign port 8888 of our host XP to forwardconnections to the guest Ubuntu’s port 80, which is the default portfor HTTP connections.
Having done that, we now turn on our guest Ubuntu and use our webbrowser on host XP to browse http://localhost:8888/. Alright, now wegot a local web server to play with.
We can also allowing SSH connections from the host OS to the guest OS as follows:
cd C:/Program Files/Sun/xVM VirtualBox VBoxManage setextradata MyUbuntu "VBoxInternal/Devices/pcnet/0 /LUN#0 /Config/ssh/HostPort" 2222 VBoxManage setextradata MyUbuntu "VBoxInternal/Devices/pcnet/0 /LUN#0 /Config/ssh/GuestPort" 22 VBoxManage setextradata MyUbuntu "VBoxInternal/Devices/pcnet/0 /LUN
相关文章推荐
- VirtualBox Guest Additions on Fedora 21/20, CentOS/RHEL 7.1/6.6/5.11
- run virtualbox on ubuntu server
- howto install Oracle VirtualBox Guest Additions on Fedora, CentOS and Red Hat (RHEL).
- Configuring JD Edwards Deployment Server and Development Client on Oracle VM VirtualBox
- Setup SSH access between VirtualBox Host and Guest VMs
- (1) PowerShell Web Access: Create PowerShell Web Access on Server 8
- Configuring JD Edwards Deployment Server and Development Client on Oracle VM VirtualBox
- (OK) How to access a NAT guest from host with VirtualBox - NAT Port Forwarding
- shellinabox : How to access ssh terminal in web browser on Linux Last updated on September 27, 2013
- VirtualBox Guest Additions install on Ubuntu and RHEL
- Install VirtualBox Guest Additions on Fedora 16/15, CentOS/RHEL 6/5.7
- Installing Guest Additions in VirtualBox for an Ubuntu Server Guest
- [Webpack] Access Webpack Dev Server from Mobile Safari on an iPhone
- How to Install Windows 7 on Oracle VirtualBox 4.2
- How do I add more disk space to a virtual guest using LVM on Red Hat Enterprise Linux?
- VirtualBox ubuntu server 16.04配置静态IP
- LAMP You don't have permission to access / on this server. 解决办法
- virtualbox剪切板失效: virtualbox xp guest 粘帖文字到ubuntu 10.04 host 有时会失效
- Eclipse导入到web项目没有run on server
- Disabling Mobile Web Page Access in SharePoint Server 2010 and SharePoint Foundation 2010