Laravel宅基地有多个站点选择本地可访问的站点 [英] Laravel homestead multiple sites choose which one is locally accesable

查看:107
本文介绍了Laravel宅基地有多个站点选择本地可访问的站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在laravel宅基地有多个地点.现在,我想通过本地网络中的ip访问特定站点.但是我总是得到我不想要的网站...

I have multiple sites in laravel homestead. Now, I want to access a spezific site via the ip in my local network. But I get allways the site I dont want...

homestead.yaml

homestead.yaml

sites:
- map: mdb.local
  to: /home/vagrant/code/mdb/public
  type: "apache"

- map: zz.tested
  to: /home/vagrant/code/abc/public
  type: "apache"

- map: 192.168.10.10
  to: /home/vagrant/code/mdb/public

还有我的主人

192.168.10.10 mdb.local
192.168.10.10 zz.tested

我可以使用域访问我的计算机,但是我总是通过本地网络中的ip获取abc.要在移动设备上获取mdb,并且只能在我的计算机上访问abc,我需要更改什么?

I can access both on my computer with the domain, however I allways get abc over the ip in the local network. What do I have to change to get mdb on mobile and abc is accessable only on my computer?

我已经阅读了这个 StackOverflow 问题,但是-您可以看到我对该解决方案的实现-它没有帮助解决这个问题.

I've read this StackOverflow Question but - you can see my implementation of this solution - it doesn't help to solve this problem.

推荐答案

Apache始终按字母顺序获取第一个站点,并将其作为默认主机返回.您可以做的是创建一个名为000default或类似名称的主机,然后在没有主机名时将其返回.

Apache always takes the first site alphabetically and returns that as the default host. What you can do is to make a host called 000default or similar, which will then be returned when there's no hostname.

这篇关于Laravel宅基地有多个站点选择本地可访问的站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆