Laravel Homestead - 我可以ping hometead.app但我无法访问homestead.app浏览器

时间:2016-05-31 13:22:04

标签: laravel laravel-5 vagrant virtualbox homestead

嗯:

我可以通过vagrant SSH访问virtul服务器中的文件。

我可以通过CMD ping homestead.app。

我可以通过CMD ping IP 192.160.10.10。

但我无法通过浏览器访问它。

如果我在浏览器中输入127.0.0.1:2222,我会得到:

SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6
Protocol mismatch.

这是我的Homestead.yaml文件:

    ---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: C:\projects\PHP
      to: /home/vagrant/Code

sites:
    - map: homestead.app
      to: /home/vagrant/Code/smr/public
      hhvm: true

databases:
    - laraveldb

# blackfire:
#     - id: foo
#       token: bar
#       client-id: foo
#       client-token: bar

# ports:
#     - send: 50000
#       to: 5000
#     - send: 7777
#       to: 777
#       protocol: udp

这是主机文件:

127.0.0.1 activate.adobe.com
192.168.10.10 homestead.app

1 个答案:

答案 0 :(得分:0)

我可以看到一个错字:

sites:
    - map: homsetead.app
      to: /home/vagrant/Code/smr/public
      hhvm: true

将地图更改为homestead.app并告诉我们