0
我剛開始學習如何在我的開發環境中使用vagrant,並且遇到了麻煩。Vagrant將'webroot'文件夾添加到我的開發環境
當我在項目的根目錄vagrant up
,它添加了一個webroot
文件夾,這不是我所追求的。
流浪漢給我下面的結構,與隨機根目錄文件夾,我覺得這是財產以後做sym_links,但沒有谷歌搜索量給我一個答案
| ProjectName ~ Main Project Folder
-| .vagrant ~ Vagrant folder
-| puppet ~ Puppet Configuration Folder
-| vendor ~ Composer vendor folder
-| webroot ~ Randomly added folder :/
- .gitignore
- composer.json
- composer.lock
- Vagrantfile
我Vagrantfile
Vagrant.configure("2") do |config|
config.vm.define "aws-control" do |namechase|
end
# Enable the Puppet provisioner, with will look in manifests
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "default.pp"
puppet.module_path = "puppet/modules"
end
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "ubuntu/trusty64"
# Forward guest port 80 to host port 80 and name mapping
config.vm.network :forwarded_port, guest: 80, host: 80
config.vm.network "public_network",
ip: "192.168.0.61",
bridge: "en0: Ethernet"
config.vm.hostname = "control.aws"
# Synced Folders
config.vm.synced_folder "/", "/vagrant/webroot/", :owner => "www-data"
end
謝謝,我以某種方式在鏈接到項目根的印象下,而不是主機根:) –