Homestead 2.0多个站点,所有站点都链接到相同的URL [英] Homestead 2.0 multiple sites, all link to the same url
问题描述
小问题:因此,我已经安装了Homestead 2.0,一切正常.我想在同一代码目录中添加另一个项目,但将其链接到另一个URL.所以我在站点列表中添加了它,但是当我访问laravel.app时,一切正常,但是当我访问larabook.app时,它向我显示了laravel.app页面!这两个网址都链接到我的/etc/hosts文件中的192.168.10.10.
Hee guys, little question: So i have setup the Homestead 2.0 and everything is working fine. I wanted to add another project in the same code directory but link it to another url. So i added it in the sites list but when i visited laravel.app it all works fine, but when I visit larabook.app it shows me the laravel.app page! Both urls are linked to 192.168.10.10 in my /etc/hosts file.
我尝试重新启动Mac并重新启动vm,但没有任何反应:'(
I have tried restarting my mac and restarting the vm but nothing is working :'(
/etc/hosts
/etc/hosts
192.168.10.10 laravel.app
192.168.10.10 larabook.app
Homestead.yaml
Homestead.yaml
folders:
- map: ~/Code
to: /home/vagrant/Code
sites:
- map: laravel.app
to: /home/vagrant/Code/Laravel/public
- map: larabook.app
to: /home/vagrant/Code/Larabook/public
databases:
- homestead
- larabook
推荐答案
假设您的Homestead.yaml文件位于上方
Assuming your Homestead.yaml file above
输入:
$ vagrant global-status
将显示类似的内容
id name provider state directory
--------------------------------------------
77c5c30 default virtualbox running et....
输入:
$ vagrant provision 77c5c30
当然,这假设您只有1个VM,如果您有其他VM,则在运行无业游民的规定时请阅读说明
Of course this assumes you only have 1 VM, if you have others then read the instruction when you run vagrant provision
这篇关于Homestead 2.0多个站点,所有站点都链接到相同的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!