【发布时间】:2022-01-16 05:11:17
【问题描述】:
我在 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 文件的内容
【问题讨论】: