对于Vagrant而言,我现在相当新,现在一年没有麻烦了。使用苏格兰盒子,它总是像我的Win10电脑上的魅力一样工作。从来没有必要深入到流浪者或设置。Scotch Box vagrant box无法通过浏览器浏览器
昨天我就像每一天一样开始了我的Vagrant盒子,但它不再工作。
- 无业游民了,似乎没有烦恼
- 工作,我可以ssh到我的盒子,共享文件夹下提供的/ var/WW像往常一样
- 我跟我的浏览器到192.168.33.10 ...连接超时
VirtualBox VM 5.0.14 r105127 win.amd64
vagrantfile
Vagrant.configure("2") do |config|
config.ssh.username = "vagrant"
config.ssh.password = "vagrant"
config.vm.box = "scotch/box"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.hostname = "scotchbox"
config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666"] }
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2
end
end
httpd的运行和监听端口80
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1285/sshd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 1056/postgres
tcp 0 0 0.0.0.0:46523 0.0.0.0:* LISTEN 648/rpc.statd
tcp 0 0 127.0.0.1:11300 0.0.0.0:* LISTEN 1355/beanstalkd
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 971/mongod
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1038/mysqld
tcp 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN 1511/redis-server *
tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 1502/memcached
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 562/rpcbind
tcp6 0 0 :::22 :::* LISTEN 1285/sshd
tcp6 0 0 :::36713 :::* LISTEN 648/rpc.statd
tcp6 0 0 :::6379 :::* LISTEN 1511/redis-server *
tcp6 0 0 :::111 :::* LISTEN 562/rpcbind
tcp6 0 0 :::80 :::* LISTEN 2084/apache2
UPDATE1
的ifconfig给出了愿望导致
eth1 Link encap:Ethernet HWaddr 08:00:27:97:ff:45
inet addr:192.168.33.10 Bcast:192.168.33.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe97:ff45/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:89 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11275 (11.2 KB) TX bytes:1836 (1.8 KB)
上的SSH登录和使用上都本地主机卷曲和后在正确的IP我得到预期的bahaviour。看来,Apache和PHP运行正常。
UPDATE2
奇怪的事情时,我另配发生。每次我重新配置/启动Vagrant时,Virtualbox都会创建一个新的网络适配器。可能需要在网络适配器中找到解决方案?
UPDATE3
直接否决了,请让我知道我怎样才能提高我的问题或提供更多的数据是非常有用的。
你(重新)提供机器吗?你有没有检查你的防火墙在Ubuntu的状态? –
奇怪的事情发生在我重新配置。每次我重新配置机器时,Virtualbox会创建一个新的网络适配器。可能需要在网络适配器中找到解决方案.. – Maurice
你的意思是一个新的?你有多少个网络适配器?你还有2,不是吗? –