【发布时间】:2016-04-18 03:20:03
【问题描述】:
作为免责声明,在最近移动了 Microsoft .NET IIS 堆栈之后,我对 Linux 相当陌生
问题:我很难配置现成的环境来开发使用以下...
- 流浪者
- 厨师
- 虚拟盒子
- Apt(食谱)
- Apache2(食谱)
我收到的错误是(点击虚拟机的主机名或 IP 时)
ERR_NAME_NOT_RESOLVED
代码太多了,我就贴一下我的vagrant文件和角色...
Vagrantfile
-----------------
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise32"
config.vm.network :forwarded_port, guest: 80, host: 4567
config.vm.host_name = "www.example.vm"
config.vm.provision "chef_solo" do |chef|
chef.cookbooks_path = "cookbooks"
end
end
vagrant-test-boc.rb
-----------------
# Name of the role should match the name of the file
name "vagrant-test-box"
# Run list function we mentioned earlier
run_list(
"recipe[apt]",
"recipe[apache2]"
)
欢迎任何建议、指南示例!
谢谢!
附加编辑:有人建议我考虑使用类似技术设置 NGINX 服务器,这是另一个问题还是在此线程中有效?
我的主要资源是……
https://adamcod.es/2013/01/15/vagrant-is-easy-chef-is-hard-part2.html https://docs.vagrantup.com/v2/provisioning/chef_solo.html
【问题讨论】:
-
你使用 chrome 吗?换个浏览器试试,chrome管理dns有点不同
-
感谢 Frédéric,但我在 Safari 中尝试过并得到相同的响应....
标签: linux nginx webserver vagrant chef-solo