我正在尝试使用流浪者制作一个LAMP框。我被告知使用它非常简单。我对网络和虚拟机完全陌生,并且对Linux/Ubuntu有很少的经验。我目前已经试过在官方文档页面上的教程:http://docs.vagrantup.com/v2/getting-started/networking.html。流氓麻烦 - “404 - 未找到”
我已经到了文档中的网络文章,似乎无法使其工作。
现在的问题是,由于我对网络和基于Linux的操作系统的经验不足,我不知道从哪里开始解决问题。我会尽力提供尽可能多的信息。
我使用带有Windows 8.1的最新版本的Virtualbox运行最新版本的Vagrant。
按照本教程中,我目前Vagrantfile看起来是这样的:
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise32"
config.vm.provision :shell, path: "bootstrap.sh"
config.vm.network :forwarded_port, host: 4567, guest: 80
end
我bootstrap.sh文件看起来像这样:
#!/usr/bin/env bash
apt-get update
apt-get install -y apache2
if ! [ -L /var/www ]; then
rm -rf /var/www
ln -f /vagrant /var/www
fi
当我去http://127.0.0.1:4567,它显示一个错误页面包含此消息:
Not Found
The requested URL/was not found on this server.
===================================================
Apache/2.2.22 (Ubuntu) Server at 127.0.0.1 Port 4567
我宁可不编辑任何配置文件除非有解释,否则我认为这将是一种解决方法。但无论如何,任何帮助将不胜感激。如果我需要开放一个端口,那么我该如何处理我正在考虑使用XAMPP的问题。
伎俩 – Raffael
tldr:创建html文件夹 – Ruben