Homestead 多站点问题
Homestead multiple sites issue
我在 homestead.yaml 文件的站点部分添加了两个站点,我的 homestead.yaml 文件的蓝图如下
ip: "192.168.10.10"
memory: 4096
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/code
to: /home/vagrant/code
sites:
- map: site1.local
to: /home/vagrant/code/site1/public
- map: site2.local
to: /home/vagrant/code/site2/public
databases:
- site1
features:
- mysql: true
- mariadb: false
- postgresql: false
- ohmyzsh: false
- webdriver: false
#services:
# - enabled:
# - "postgresql@12-main"
# - disabled:
# - "postgresql@11-main"
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
我在我的 /etc/hosts 文件中添加了这两个站点,蓝图如下
192.168.10.10 site1.local
192.168.10.10 site2.local
然后我运行提供宅基地。
当我 运行 site1.local 或 site2.local 他们都向我显示 site1.local 个文件的内容
我重新安装homestead解决了
我在 homestead.yaml 文件的站点部分添加了两个站点,我的 homestead.yaml 文件的蓝图如下
ip: "192.168.10.10"
memory: 4096
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/code
to: /home/vagrant/code
sites:
- map: site1.local
to: /home/vagrant/code/site1/public
- map: site2.local
to: /home/vagrant/code/site2/public
databases:
- site1
features:
- mysql: true
- mariadb: false
- postgresql: false
- ohmyzsh: false
- webdriver: false
#services:
# - enabled:
# - "postgresql@12-main"
# - disabled:
# - "postgresql@11-main"
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
我在我的 /etc/hosts 文件中添加了这两个站点,蓝图如下
192.168.10.10 site1.local
192.168.10.10 site2.local
然后我运行提供宅基地。
当我 运行 site1.local 或 site2.local 他们都向我显示 site1.local 个文件的内容
我重新安装homestead解决了