我可以很好地通过SSH连接到我的流浪盒,也可以从网络上的另一台计算机上做到这一点很棒,但我似乎无法访问该网址。
当我尝试访问192.168.1.127时,甚至在主机上我得到了
此网页无法使用
目前我在SSH上的ifconfig:
vagrant@vagrant:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:91:14:ca
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe91:14ca/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:490 errors:0 dropped:0 overruns:0 frame:0
TX packets:314 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:52297 (52.2 KB) TX bytes:43532 (43.5 KB)
eth1 Link encap:Ethernet HWaddr 08:00:27:5b:38:98
inet addr:192.168.1.127 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:762 errors:0 dropped:0 overruns:0 frame:0
TX packets:69 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:72423 (72.4 KB) TX bytes:8567 (8.5 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
我的流浪档案
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "chef/ubuntu-14.04"
config.vm.network :public_network, ip: '192.168.1.127', :netmask => '255.255.255.0', :bridge => 'eth0'
config.vm.synced_folder "../pqs4", "/var/www/pqs4/", :nfs => false, :mount_options => ["dmode=777","fmode=666"]
config.vm.define :pqs4 do |t|
end
config.vm.provider "virtualbox" do |v|
v.name = "pqs4"
v.memory = 4096
v.cpus = 4
end
config.vm.provision :shell, :path => "provision.sh"
config.vm.provision "ansible" do |provisioner|
provisioner.inventory_path = "hosts"
provisioner.playbook = "playbook.yml"
provisioner.verbose = 'v'
provisioner.limit = 'all'
end
end