我在MAMP(非专业版)对应的apache 的httpd-vhost文件中配置了多个虚拟机,但只能有一个生效.
### 相关代码
<VirtualHost *:80>
DocumentRoot "/Applications/MAMP/htdocs/crm.com"
ServerName crm.com
<Directory "/Applications/MAMP/htdocs/crm.com">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Applications/MAMP/htdocs/lr.com/public"
ServerName lr.com
<Directory "/Applications/MAMP/htdocs/lr.com/public">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
</Directory>
</VirtualHost>