無論出於何種原因,我無法獲得多個網站與Homestead合作。每增加一個新網站,當我在瀏覽器中訪問它時,都會返回相同的網站Laravel 5.2 - Homestead每個域的同一網站加載
我嘗試了每次在堆棧以及larvel.io中遇到的「解決方案」。他們都沒有解決問題。任何幫助將不勝感激。
下面是我的.yaml文件和我的主機文件的內容。
本地目錄結構:
Root directory = WWW
project1 = WWW/project1
project2 = WWW/project2
Homestead.yaml:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/WWW
to: /home/vagrant/Code
sites:
- map: /project1.app
to: /home/vagrant/Code/project1/public
- map: /project2.dev
to: /home/vagrant/Code/project2/public
databases:
- project1_db
- project2_db
variables:
- key: 'APP_ENV'
value: 'local'
- key: 'APP_DEBUG'
value: 'true'
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 93000
# to: 9300
# - send: 7777
# to: 777
# protocol: ump
/etc/hosts文件:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
192.168.10.10 project1.app
192.168.10.10 project2.dev
我曾嘗試以下:
- 遊民提供
- 流浪漢重裝--provision
- 銷燬箱和無業遊民了
- 流浪漢的全球地位,其次是無業遊民提供VM#
- 也試圖映射文件夾和網站
ex:
folders:
- map: ~/WWW/project1
to: /home/vagrant/Code/project1
- map: ~/WWW/project2
to: /home/vagrant/Code/project2
sites:
- map: /project1.app
to: /home/vagrant/Code/project1/public
- map: /project2.dev
to: /home/vagrant/Code/project2/public