启用httpd-vhosts.conf后WAMP服务器未运行 [英] WAMP server not running after enabling httpd-vhosts.conf

查看:200
本文介绍了启用httpd-vhosts.conf后WAMP服务器未运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在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:

  1. 转到开始菜单
  2. 输入"cmd"
  3. 按Enter
  4. 粘贴以下C:\wamp\bin\apache\apache2.2.22\bin\httpd.exe
  1. Go to start menu
  2. type "cmd"
  3. press enter
  4. paste the following C:\wamp\bin\apache\apache2.2.22\bin\httpd.exe

注意:您可能需要根据您本地的Apache版本调整路径的apache2.2.22部分.

这篇关于启用httpd-vhosts.conf后WAMP服务器未运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆