启用httpd-vhosts.conf后WAMP服务器未运行 [英] WAMP server not running after enabling httpd-vhosts.conf
问题描述
我尝试在WAMP安装上启用虚拟主机,但是如果启用http-vhosts.conf,并且WAMP服务器将无法运行,并且该图标仍然为橙色.
I tried enabling Virtual Host on my WAMP installation, but WAMP server will not run if I enable http-vhosts.conf, and the icon remains orange.
这是我的主机文件:
127.0.0.1 localhost
127.0.0.1 test.localhost
我的httpd.conf:
My httpd.conf:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
和我的httpd-vhosts.conf:
and my 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中,它可以很好地工作,但是我注意到,如果我注释掉"Include conf/extra/httpd-vhosts.conf",则Apache服务器将无法运行.是什么导致此问题?
It works fine if I add the VirtualHosts to my httpd.conf, but I noticed that the Apache server will not run if I comment out "Include conf/extra/httpd-vhosts.conf". What is causing this issue?
谢谢
推荐答案
要确定发生错误的确切行,请执行以下步骤:
To determine the exact line on which the error is occurring, take the following steps:
- 转到开始菜单
- 输入"cmd"
- 按Enter
- 粘贴以下
C:\wamp\bin\apache\apache2.2.22\bin\httpd.exe
- Go to start menu
- type "cmd"
- press enter
- paste the following
C:\wamp\bin\apache\apache2.2.22\bin\httpd.exe
注意:您可能需要根据您本地的Apache版本调整路径的
apache2.2.22
部分.
这篇关于启用httpd-vhosts.conf后WAMP服务器未运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!