まず、VM内のapacheが使用しているのと同じポートであるポート80を使用しているため、IISを無効にします。
次に、NAT構成を調べて、VMからポート80をホストのポート80としてエクスポートしていることを確認します。
第三に、あなたは使用したいかもしれませんVagrant
、それはたくさんの鐘と笛を備えたVirtualBoxコマンドラインVMマネージャーです。試してみたい場合は、すぐに始められるようにVagrant
投稿します。Vagrantfile
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# Specify the virtual machine base box file. This box file
# is actually a compressed VMDK file with some aditional
# settings.
# The one specified here is a default Ubuntu Lucid Lynx
# 32bit install but you can find many others online. The url is
# external (HTTP) because Vagrant cand download this box if you
# don't already have it
config.vm.box = "MyVM"
config.vm.box_url = "http://files.vagrantup.com/lucid32.box"
# Tells VirtualBox to not open a GUI, it helps you avoid
# having a window for VirtualBox and another window for the VM.
# For server management windows are not necessary you can
# connect to the VM using SSH (putty for example).
config.vm.boot_mode = :headless
# In this section every pair of parameters is a VBoxManage
# parameter/value configuration.
config.vm.customize [
"modifyvm", :id,
# Specify the virtual machine name you want to see in
# VirtualBox
"--name", "MyVM",
# Memory for the VM
"--memory", "2048",
# This fixes a bug that makes the guest not have DNS
# proper access and implicitly not internet.
"--natdnsproxy1", "on",
"--natdnshostresolver1", "on"
]
# This forwards port 80 to port 4567
config.vm.forward_port 80, 4567
# This mounts a shared folder between your machine and the
# VM. The host directory is the current working directory (the
# one you have put your Vagrantfile in). The directory is
# mounted inside the guest as /vagrant
config.vm.share_folder "v-root", "/vagrant", "."
end