所以我在几个mac和PC上使用vagrant进行本地开发。
虚拟主机puphpet/config.yaml
看起来像这样
piYyhCPLFha4:
servername: iamsumit.dev
serveraliases:
- www.iamsumit.dev
docroot: /var/www/iamsumit/dist
port: '80'
setenv:
- 'APP_ENV dev'
override:
- All
options:
- Indexes
- FollowSymLinks
- MultiViews
engine: php
custom_fragment: ''
ssl_cert: ''
ssl_key: ''
ssl_chain: ''
ssl_certs_dir: ''
piYyhCPLFha5:
servername: relocation.dev
serveraliases:
- www.relocation.dev
docroot: /var/www/moovel/relocation-app/dist
port: '80'
setenv:
- 'APP_ENV dev'
override:
- All
options:
- Indexes
- FollowSymLinks
- MultiViews
engine: php
custom_fragment: ''
ssl_cert: ''
ssl_key: ''
ssl_chain: ''
ssl_certs_dir: ''
piYyhCPLFha7:
servername: einzl.dev
serveraliases:
- www.einzl.dev
docroot: /var/www/einzl/dist
port: '80'
setenv:
- 'APP_ENV dev'
override:
- All
options:
- Indexes
- FollowSymLinks
- MultiViews
engine: php
custom_fragment: ''
ssl_cert: ''
ssl_key: ''
ssl_chain: ''
ssl_certs_dir: ''
现在我的问题是,我无法让中间虚拟主机relocation.dev
在特定的 mac 上工作(在所有其他机器上完美运行)。
其他虚拟主机运行良好。只是一个虚拟主机不起作用。浏览器只会加载很长时间,然后显示“网站不可用”消息。
这是我的主机文件:
##
# 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.56.102 einzl.dev
192.168.56.102 boss.dev
192.168.56.102 iamsumit.dev
192.168.56.102 relocation.dev
192.168.56.102 nephalem.dev
192.168.56.102 polygoncreator.dev
192.168.56.102 car2clean.dev
192.168.56.102 elearning.dev
docroot 是正确的。我无法想象是什么导致 puphpet/vagrant 无法识别这个虚拟主机。什么可能导致这种行为?