我正在尝试在我的本地apache2服务器上设置多个虚拟主机。我的目标是能够在我的Zend项目的浏览器中转到“zf2-tutorial.localhost”,然后转到我的Symfony项目的“symfony.localhost”。现在,无论我去“zf2-tutorial.localhost”还是“symfony.localhost”,我的Zend项目都会得到服务。这是我的http.conf文件的一部分
<VirtualHost *:80>
ServerName zf2-tutorial.localhost
DocumentRoot /Users/myusername/Sites/Zend/public
SetEnv APPLICATION_ENV "development"
<Directory /Users/myusername/Sites/Zend/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
Options Indexes FollowSymLinks
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName symfony.localhost
DocumentRoot /Users/myusername/Sites/symfony
SetEnv APPLICATION_ENV "development"
ServerAlias www.symfony.localhost
</VirtualHost>
我的“主机”文件以这两行结尾
127.0.0.1 zf2-tutorial.localhost localhost
127.0.0.1 symfony.localhost localhost
我做错了什么?