0
我想在我的Windows机器上安装虚拟主机。在我httpd-vhosts.conf
文件,我有这样的:如何在WAMP中调试似乎不工作的虚拟主机?
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "c:/wamp/www"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/blg"
ServerName blg.com
</VirtualHost>
当我去http://localhost
,我看到c:/wamp/www
下的所有文件夹,以便看起来不错。但是,当我转到http://blg.com
时,我期望看到c:/wamp/www/blg
中的文件,但我不知道。相反,我正在看到localhost所看到的内容:c:/wamp/www
中的文件。我的设置有什么问题?
你使用的是什么apache版本?如果它低于2.4,则可能需要添加[NameVirtualHost](http://httpd.apache.org/docs/2.2/en/mod/core.html#namevirtualhost)指令。 – CBroe
2.4.9是我使用的版本。 – StackOverflowNewbie
看到这篇文章如何正确设置虚拟主机http://stackoverflow.com/questions/23665064/project-links-do-not-work-on-wamp-server/23990618#23990618 – RiggsFolly