Laravel homestead链接到同一目录

时间:2015-12-24 14:40:11

标签: php laravel vagrant homestead

我正在建立家园。但是,当我想将另一个网站添加到宅基地时,它指向同一个目录?

这是我的Homestead.yaml文件:

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

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/documents/vagrant/sites
      to: /home/vagrant/Code

sites:
    - map: test.app
      to: /home/vagrant/Code/test
    - map: testt.app
      to: /home/vagrant/Code/secondtest
databases:
    - homestead

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

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

当我去testt.app时,它指向与test.app相同的目录。这就是我的etc / hosts文件的样子:

enter image description here

我的家园目录:

enter image description here

每次我在homestead.yaml文件中进行更改时,我都会做:“vagrant provision”。当我进入我的宅基地服务器时,我可以转到目录secondtest,因此它存在。

2 个答案:

答案 0 :(得分:0)

在您的etc/hosts中,您应该将这两个域指向192.168.10.10 IP,而不是127.0.0.1

答案 1 :(得分:0)

您实际运行了配置命令吗?

homestead provision