尝试设置虚拟主机并不确定我做错了什么。如果我运行 apachectl,我会收到此警告。
$ sudo apachectl -t
httpd: Could not reliably determine the server's fully qualified domain name, using Johns-MacBook-Pro.local for ServerName
[Tue Apr 16 21:34:01 2013] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
Syntax OK
所以发生的事情是一切都恢复到顶级虚拟主机。这是我的虚拟主机文件
<VirtualHost *:80>
DocumentRoot "/Users/jcostanzo/development/impress"
ServerName impress.local
ServerAlias impress.local
ErrorLog "/private/var/log/apache2/impress.local-error_log"
<Directory "/Users/jcostanzo/development/impress" >
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Users/jcostanzo/development/testsomething"
ServerName testing.local
ServerAlias testing.local
ErrorLog "/private/var/log/apache2/test.local-error_log"
<Directory "/Users/jcostanzo/development/testsomething" >
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>