我在装载VirtualHosts时遇到问题我已经在我的iMac上设置了,他们似乎返回的所有内容都是空白页面 . 我尝试了多个浏览器,刷新了我的DNS缓存,清除了浏览器缓存等,但似乎没有任何东西可以解决这个问题 .

这是我的 /etc/apache2/httpd-vhosts/conf 文件的样子:

NameVirtualHost *:80

<Directory "/Users/chris/Sites/test/">
Allow From All
AllowOverride All
</Directory>
<VirtualHost *:80>
    ServerName "test.dev"
    ServerAlias "test.dev.*.*.*.*.xip.io"
    DocumentRoot "/Users/chris/Sites/test"
</VirtualHost>

这是我的 /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 
fe80::1%lo0 localhost

# VHX START
127.0.0.1 test.dev
fe80::1%lo0 test.dev
# VHX STOP

在我的 /private/etc/apache2/httpd.conf 文件中,我确保取消注释以下行:

Include /private/etc/apache2/extra/httpd-vhosts.conf

我正在使用VirtualHostX管理所有这些,但我甚至采取删除这些文件中的所有内容并重新开始在线指南 - 这也不起作用 .

我试图阻止apache访问日志,每当我尝试访问http://test.dev没有显示在该文件或apache错误日志中 - 就好像我的机器完全不知道URL存在,即使我相信一切都设置正确 .

关于如何解决这个问题的任何想法?

谢谢,克里斯