我尝试在我的 WAMP 安装上启用虚拟主机,但如果我启用 http-vhosts.conf,WAMP 服务器将不会运行,并且图标仍为橙色。
这是我的主机文件:
127.0.0.1 localhost
127.0.0.1 test.localhost
我的 httpd.conf:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
和我的 httpd-vhosts.conf:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "c:/wamp/www"
ServerName localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/test"
ServerName test.localhost
</VirtualHost>
如果我将 VirtualHosts 添加到我的 httpd.conf 中它工作正常,但我注意到如果我注释掉“包含 conf/extra/httpd-vhosts.conf”,Apache 服务器将不会运行。是什么导致了这个问题?
谢谢,