2016-02-27 88 views
0

我有我的流浪者問題。我已經爲該項目創建了guest ubuntu 14.04。這是我的無業遊民文件流浪者沒有看到別名

# -*- mode: ruby -*- 
# vi: set ft=ruby : 

Vagrant.configure("2") do |config| 
    config.vm.box = "example" 

    config.vm.provider :virtualbox do |v| 
     v.customize ["modifyvm", :id, "--memory", "4056"] 
     v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] 
     v.customize ["modifyvm", :id, "--natdnsproxy1", "on"] 
     v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/home/user/sites/projects-folder", "1"] 
     # v.customize ["modifyhd", :id, "--resize", "15360"] 
    end 

    config.vm.provision :shell, :inline => "sudo apt-get update" 

    config.vm.synced_folder "/home/user/sites/projects-folder", "/var/www/projects-folder", create: true, :nfs => true 
    config.nfs.map_uid = Process.uid 
    config.nfs.map_gid = Process.gid 

    config.vm.network :private_network, ip: "33.33.33.11"  
    config.vm.network :forwarded_port, guest: 80, host: 8081 

    config.hostsupdater.aliases = ["www.example.local, api.example.local, business.example.local"] 

end 

下面是從/ etc/

<VirtualHost *:80> 
    ServerAdmin [email protected] 
    ServerName www.example.local 
    ServerAlias www.example.local 

    DocumentRoot /var/www/projects-folder/www.example/dist 

    ErrorLog ${APACHE_LOG_DIR}/error.log 
    CustomLog ${APACHE_LOG_DIR}/access.log combined 
</VirtualHost> 

的Apache2 /啓用站點,當我去到IP 33.33.33.11從我的主機我看到apache的頁面(我的配置所以它的作品)。

但www.example.local - 不

回答

0

您是否安裝在流浪者的hostupdater插件?您可以通過執行檢查已安裝的插件,

$ vagrant plugin list 

如果沒有安裝hostupdater你可以安裝它,

$ vagrant plugin install vagrant-hostsupdater