流浪者 /etc/hosts
Vagrant /etc/hosts
我一直在更改我的 /etc/hosts 文件以将实时 URL 重定向到我本地的 vagrant box,直到最近它都运行良好。
我的主机文件中有这样的东西
example.be 10.11.10.12
我需要这样做,因为我正在使用链接到实时域的第三方 javascript SDK。
我认为这是配置文件中最重要的内容:
Vagrant.configure(2) do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "bento/debian-7.8"
config.vm.network "forwarded_port", guest: 80, host: 3001
config.vm.network "private_network", ip: "10.11.10.12"
config.ssh.forward_agent = true
config.vm.synced_folder ".", "/vagrant", type: "nfs" # NFS because VirtualBox shared VM is too slow
config.vm.provider "virtualbox" do |vb|
# This all might be a bit excessive, but it'll run ;)
vb.memory = 2048
vb.cpus = 4
# The internet says these changes improve VM performance
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
end
end
我发现了类似的问题,但 none 完全回答了我的问题。问题是,它以前有效,现在无效,这对我来说是最难的部分...
仅供参考:我正在使用 OS X Yosemite 10.10.5
好吧,我现在觉得自己很蠢,看来我只需要在我的主机文件中改变一下...
所以我应该:
10.11.10.12 example.be
奇怪的是它以前有效。
总之,回去工作吧。往前走,没什么可看的。
我一直在更改我的 /etc/hosts 文件以将实时 URL 重定向到我本地的 vagrant box,直到最近它都运行良好。
我的主机文件中有这样的东西
example.be 10.11.10.12
我需要这样做,因为我正在使用链接到实时域的第三方 javascript SDK。
我认为这是配置文件中最重要的内容:
Vagrant.configure(2) do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "bento/debian-7.8"
config.vm.network "forwarded_port", guest: 80, host: 3001
config.vm.network "private_network", ip: "10.11.10.12"
config.ssh.forward_agent = true
config.vm.synced_folder ".", "/vagrant", type: "nfs" # NFS because VirtualBox shared VM is too slow
config.vm.provider "virtualbox" do |vb|
# This all might be a bit excessive, but it'll run ;)
vb.memory = 2048
vb.cpus = 4
# The internet says these changes improve VM performance
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
end
end
我发现了类似的问题,但 none 完全回答了我的问题。问题是,它以前有效,现在无效,这对我来说是最难的部分...
仅供参考:我正在使用 OS X Yosemite 10.10.5
好吧,我现在觉得自己很蠢,看来我只需要在我的主机文件中改变一下...
所以我应该:
10.11.10.12 example.be
奇怪的是它以前有效。
总之,回去工作吧。往前走,没什么可看的。