Apache不会从wamp开始

时间:2022-10-21 20:54:09

I have been googling for the past few hours but I simply can't get my apache on wamp to start. My skype isn't running, and the test port 80 shows it isn't being used by anything. Before this happened, I was trying to add a new vhost, but now I have reverted back all of the files where I made changes. Anyway to debug why apache won't start?

在过去的几个小时里,我一直在google上搜索,但是我根本无法让我的apache启动wamp。我的skype没有运行,测试端口80显示它没有被任何东西使用。在此之前,我试图添加一个新的vhost,但是现在我已经恢复了所有进行更改的文件。为了调试为什么apache不启动?

Clicking on start/resume service for apache doesn't show any errors either.

单击apache的start/resume服务也不会显示任何错误。

Also just in case, I am running Win7 64bit

同样,为了以防万一,我正在运行Win7 64位。

12 个解决方案

#1


84  

If you have an issue in the httpd.conf or any files included by it there are a couple of ways to find out what the problem is

如果您在httpd中有问题。conf或它包含的任何文件有两种方法可以找出问题所在

First look at your Windows Event Viewer. Click on the Windows link in the left and menu and then Applications. Look for messages from Apache with the red error icon.

首先查看Windows事件查看器。单击左边的Windows链接和菜单,然后单击应用程序。使用红色错误图标查找来自Apache的消息。

Secondly, open a command window, then CD into \wamp\bin\apache\apache2.x.y\bin, replace x,y with your actual version. Now you can run this command to get Apache(httpd) to vaidate the httpd.conf file.

其次,打开一个命令窗口,然后CD进入\wamp\bin\apache\apache2.x。y\bin,用你的实际版本替换x,y。现在,您可以运行这个命令来让Apache(httpd)对httpd进行vaidate。conf文件。

httpd.exe -t

This should give errors with line numbers related to the http.conf file. It stops on the first error, so you will have to keep running it and fixing the error and then run it again until it gives the all OK message.

这会产生与http相关的行号错误。conf文件。它会在第一个错误上停止,所以您必须继续运行它并修复错误,然后再运行它,直到它给出所有OK消息。

#2


17  

That is what I did and it helped me to find out what my Apache-PHP needed:

这就是我所做的,它帮助我发现我的Apache-PHP需要什么:

C:\Users\Admin>cd C:\wamp\bin\apache\apache2.4.9\bin

C:\wamp\bin\apache\apache2.4.9\bin>httpd -t
Syntax OK

C:\wamp\bin\apache\apache2.4.9\bin>httpd -k start
[Thu Apr 23 14:14:52.150189 2015] [mpm_winnt:error] [pid 3184:tid 112] 
(OS 2)The system cannot find the file specified.  : AH00436: 
No installed service named "Apache2.4".

C:\wamp\bin\apache\apache2.4.9\bin>

The most simple solution:

最简单的解决方案:

Uninstall and reinstall WAMP (do not even try to set it up on top of existing installation - it would not help)

卸载和重新安装WAMP(不要试图在现有的安装上安装它——它不会有帮助)

P.S.

注:

If you wonder how did I get to this situation, here is the answer: I was trying to install WAMP and it throws me an error in the middle of installation saying:

如果你想知道我是怎么得到这个情况的,答案是:我试着安装WAMP,它在安装过程中给我一个错误提示:

httpd.exe - System Error

The program can't start because MSVCR110.dll is missing from your computer. 
Try reinstalling the program to fix this problem.

OK

I got and installed Microsoft Visual C++ 2012 Redistributable from here http://www.microsoft.com/en-us/download/details.aspx?id=30679#

我在这里安装了Microsoft Visual c++ 2012 Redistributable http://www.microsoft.com/en-us/download/details.aspx?id=30679#

And it gave me the "dll" and the MYSQL started working, but not Apache. To make Apache to work I uninstalled and reinstalled WAMP.

它给了我“dll”,MYSQL也开始工作了,但不是Apache。为了让Apache工作,我卸载和重新安装WAMP。

#3


11  

Use apaches startup debug tool from command:

使用apaches启动调试工具:

httpd.exe -e warn

  1. press Win+R
  2. Win + R
  3. type cmd and press enter
  4. 输入cmd并按enter键
  5. goto directory which contains your apache httpd.exe file. for example if your wamp is installed in e:\wamp type cd /d e:\wamp\bin\apache\ApacheX.X.X\bin in cmd and press enter.
  6. goto目录包含您的apache httpd。exe文件。例如,如果你的wamp安装在e:\wamp型号cd /d:\wamp\bin\ \apache\ apachexe . x中。X\bin in cmd,按enter键。
  7. type httpd.exe -e warn (or httpd.exe -e debug for more details) to see error message about problem which is prohibiting apache to start.
  8. httpd类型。exe -e警告(或httpd)。exe -e调试了解更多细节),查看关于禁止apache启动的问题的错误信息。

#4


0  

Invalid Command '80HostnameLookups' , perhaps misspelled or defined by a module not included in the server configuration
I got this error when I debug the issue (wamp server was not going online) by the procedure defined by @RiggsFolly. Just comment the line 80HostnameLookups Off by changing it to #80HostnameLookups Off. This solution worked for me and apache starts running.
Note:80HostnameLookups Off can be found on line 222 of httpd.conf file located in C:\wamp\bin\apache\apache2.4.9\conf

无效的命令“80HostnameLookups”,可能是由一个没有包含在服务器配置中的模块拼写错误或定义的。只要将第80HostnameLookups改为#80HostnameLookups就行了。注意:可以在httpd的222行找到80HostnameLookups。位于C:\wamp\bin\ apache2.4.9\conf中的conf文件

#5


0  

phpmyadmin.conf opened with apacheconf.exe and contents chained so you must do the following:

phpmyadmin。conf apacheconf开张。exe和内容链表,因此您必须执行以下操作:

  1. copy contents of phpsysinfo.conf [C:\wamp\alias]
  2. 复制phpsysinfo内容。设计(C:\ wamp \别名)
  3. paste into phpmyadmin.conf [C:\wamp\alias]
  4. 粘贴到phpmyadmin。设计(C:\ wamp \别名)
  5. change Alias /phpsysinfo "c:/wamp/apps/phpsysinfo3.1.12/" to Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.1.14/"
  6. 更改别名/phpsysinfo“c:/wamp/apps/phpsysinfo3.1.12/”到Alias /phpmyadmin“c:/wamp/apps/phpmyadmin4.1.14/”
  7. change <Directory c:/wamp/apps/phpsysinfo3.1.12/ /> to <Directory c:/wamp/apps/phpmyadmin4.1.14/ />
  8. 将 <目录c: wamp apps phpsysinfo3.1.12> 改为 <目录c: wamp apps phpmyadmin4.1.14>

its worked for me.

它为我工作。

#6


0  

My solution was that 2 .dll files(msvcp110.dll, msvcr110.dll) were missing from the directory : C:\wamp\bin\apache\apache2.4.9\bin So I copied these 2 files to all these locations just in case and restarted wamp it worked C:\wamp C:\wamp\bin\apache\apache2.4.9\bin C:\wamp\bin\apache\apache2.4.9 C:\wamp\bin\mysql\mysql5.6.17 C:\wamp\bin\php\php5.5.12

我的解决方案是2 .dll文件(msvcp110)。我把这两个文件复制到所有这些地方,以防万一,并重新启动它

I hope this helps someone out.

我希望这能帮助别人。

#7


0  

I just search this solution, but can't find. Then I solved that by check some parts on wamp in my laptop.

我只是搜索这个解,但是找不到。然后我通过检查我笔记本上wamp的一些部件来解决这个问题。

We know that apache server runs with :80 port by default. Your PC have already used this port by another services. So, first

我们知道apache服务器默认使用:80端口运行。您的PC已经被其他服务使用了这个端口。所以,首先

  1. Click on wamp icon->Apache->Service->Test Port 80
  2. 单击wamp图标->Apache->服务->测试端口80

Then u can find the service which can use :80 port.

然后你可以找到可以使用的服务:80端口。

  OR
  1. Go to "control panel-> Programs and features-> Turn Windows features on or off ". And unchecke right on "Internet Information Service". Then Restart your PC.
  2. 去“控制面板->程序和功能->打开或关闭窗口功能”。并取消“互联网信息服务”的登记。然后重新启动你的电脑。

Problem was solved.

问题已经解决了。

#8


0  

My solution on Windows 10 was just to stop IIS (Internet Information Services).

我在Windows 10上的解决方案就是停止IIS (Internet信息服务)。

#9


0  

If Apache is installed as a Windows service, any errors will show up in the Windows System event log. To view the System event log, navigate to Windows Administrative Tools->Event Viewer and open the System log in the Windows Logs folder. Or, you can see the same errors by running httpd.exe at the command line. In my case, httpd.exe is located here: C:\Bitnami\wampstack-5.6.26-2\apache2\bin.

如果Apache被安装为Windows服务,那么任何错误都将显示在Windows系统事件日志中。要查看系统事件日志,请导航到Windows管理工具——>事件查看器,并在Windows Logs文件夹中打开系统日志。或者,您可以通过运行httpd看到相同的错误。exe在命令行。在我的例子中,httpd。exe位于这里:C:\Bitnami\wampstack-5.6.26-2\apache2\bin。

If there is a problem with starting Apache, most likely the problem can be fixed by editing the httpd.conf file located in the \apache2\conf folder. As already suggested, you can check the syntax of the httpd.conf file by running httpd.exe -t at the command line.

如果在启动Apache时出现问题,那么通过编辑httpd可以解决这个问题。位于\apache2\conf文件夹中的conf文件。如前所述,您可以检查httpd的语法。通过运行httpd conf文件。exe -t在命令行。

I found that the I had to

我发现我必须这么做

Change SetEnv PATH "C:\Bitnami\wampstack-5.6.26-2\apache2\bin;${PATH}" in httpd.conf

改变SetEnv路径“C:\Bitnami\wampstack-5.6.26-2\apache2\bin;${PATH}

to

SetEnv PATH "C:\Bitnami\wampstack-5.6.26-2\apache2\bin;%PATH%"

SetEnv路径“C:\ Bitnami这样\ wampstack-5.6.26-2 \输入\ bin,% %”

#10


0  

I had the same problem. My port 80 was not in use.

我也有同样的问题。我的端口80没有使用。

After thorough research, all I did was to download Update for Universal C Runtime.

在深入研究之后,我所做的就是下载Universal C运行时的Update。

Once installed and my PC restarted, all was OK.

安装完毕,我的电脑重新启动,一切正常。

#11


0  

I was having the same problem, the mysql service was starting but not the apache service, the main problem about that is one of your virtual hosts isn't config. correctly, all i did was deleted the virtual host that i created "D:\wamp\bin\apache\apache2.4.23\conf\extra\httpd-vhosts, restarted all services apache service started working correctly and so i just went to localhost and added a virtual host automatically and so it worked!!

我遇到了同样的问题,mysql服务开始了但不是apache服务,主要的问题是你的虚拟主机不是配置。正确的是,我所做的只是删除了我创建的虚拟主机“D:\wamp\bin\apache\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

#12


-1  

Sometimes it is Skype or another application "Holding" on to port 80. Jusct close Skype

有时是Skype或其他应用程序“坚持”到端口80。Jusct关闭Skype

#1


84  

If you have an issue in the httpd.conf or any files included by it there are a couple of ways to find out what the problem is

如果您在httpd中有问题。conf或它包含的任何文件有两种方法可以找出问题所在

First look at your Windows Event Viewer. Click on the Windows link in the left and menu and then Applications. Look for messages from Apache with the red error icon.

首先查看Windows事件查看器。单击左边的Windows链接和菜单,然后单击应用程序。使用红色错误图标查找来自Apache的消息。

Secondly, open a command window, then CD into \wamp\bin\apache\apache2.x.y\bin, replace x,y with your actual version. Now you can run this command to get Apache(httpd) to vaidate the httpd.conf file.

其次,打开一个命令窗口,然后CD进入\wamp\bin\apache\apache2.x。y\bin,用你的实际版本替换x,y。现在,您可以运行这个命令来让Apache(httpd)对httpd进行vaidate。conf文件。

httpd.exe -t

This should give errors with line numbers related to the http.conf file. It stops on the first error, so you will have to keep running it and fixing the error and then run it again until it gives the all OK message.

这会产生与http相关的行号错误。conf文件。它会在第一个错误上停止,所以您必须继续运行它并修复错误,然后再运行它,直到它给出所有OK消息。

#2


17  

That is what I did and it helped me to find out what my Apache-PHP needed:

这就是我所做的,它帮助我发现我的Apache-PHP需要什么:

C:\Users\Admin>cd C:\wamp\bin\apache\apache2.4.9\bin

C:\wamp\bin\apache\apache2.4.9\bin>httpd -t
Syntax OK

C:\wamp\bin\apache\apache2.4.9\bin>httpd -k start
[Thu Apr 23 14:14:52.150189 2015] [mpm_winnt:error] [pid 3184:tid 112] 
(OS 2)The system cannot find the file specified.  : AH00436: 
No installed service named "Apache2.4".

C:\wamp\bin\apache\apache2.4.9\bin>

The most simple solution:

最简单的解决方案:

Uninstall and reinstall WAMP (do not even try to set it up on top of existing installation - it would not help)

卸载和重新安装WAMP(不要试图在现有的安装上安装它——它不会有帮助)

P.S.

注:

If you wonder how did I get to this situation, here is the answer: I was trying to install WAMP and it throws me an error in the middle of installation saying:

如果你想知道我是怎么得到这个情况的,答案是:我试着安装WAMP,它在安装过程中给我一个错误提示:

httpd.exe - System Error

The program can't start because MSVCR110.dll is missing from your computer. 
Try reinstalling the program to fix this problem.

OK

I got and installed Microsoft Visual C++ 2012 Redistributable from here http://www.microsoft.com/en-us/download/details.aspx?id=30679#

我在这里安装了Microsoft Visual c++ 2012 Redistributable http://www.microsoft.com/en-us/download/details.aspx?id=30679#

And it gave me the "dll" and the MYSQL started working, but not Apache. To make Apache to work I uninstalled and reinstalled WAMP.

它给了我“dll”,MYSQL也开始工作了,但不是Apache。为了让Apache工作,我卸载和重新安装WAMP。

#3


11  

Use apaches startup debug tool from command:

使用apaches启动调试工具:

httpd.exe -e warn

  1. press Win+R
  2. Win + R
  3. type cmd and press enter
  4. 输入cmd并按enter键
  5. goto directory which contains your apache httpd.exe file. for example if your wamp is installed in e:\wamp type cd /d e:\wamp\bin\apache\ApacheX.X.X\bin in cmd and press enter.
  6. goto目录包含您的apache httpd。exe文件。例如,如果你的wamp安装在e:\wamp型号cd /d:\wamp\bin\ \apache\ apachexe . x中。X\bin in cmd,按enter键。
  7. type httpd.exe -e warn (or httpd.exe -e debug for more details) to see error message about problem which is prohibiting apache to start.
  8. httpd类型。exe -e警告(或httpd)。exe -e调试了解更多细节),查看关于禁止apache启动的问题的错误信息。

#4


0  

Invalid Command '80HostnameLookups' , perhaps misspelled or defined by a module not included in the server configuration
I got this error when I debug the issue (wamp server was not going online) by the procedure defined by @RiggsFolly. Just comment the line 80HostnameLookups Off by changing it to #80HostnameLookups Off. This solution worked for me and apache starts running.
Note:80HostnameLookups Off can be found on line 222 of httpd.conf file located in C:\wamp\bin\apache\apache2.4.9\conf

无效的命令“80HostnameLookups”,可能是由一个没有包含在服务器配置中的模块拼写错误或定义的。只要将第80HostnameLookups改为#80HostnameLookups就行了。注意:可以在httpd的222行找到80HostnameLookups。位于C:\wamp\bin\ apache2.4.9\conf中的conf文件

#5


0  

phpmyadmin.conf opened with apacheconf.exe and contents chained so you must do the following:

phpmyadmin。conf apacheconf开张。exe和内容链表,因此您必须执行以下操作:

  1. copy contents of phpsysinfo.conf [C:\wamp\alias]
  2. 复制phpsysinfo内容。设计(C:\ wamp \别名)
  3. paste into phpmyadmin.conf [C:\wamp\alias]
  4. 粘贴到phpmyadmin。设计(C:\ wamp \别名)
  5. change Alias /phpsysinfo "c:/wamp/apps/phpsysinfo3.1.12/" to Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.1.14/"
  6. 更改别名/phpsysinfo“c:/wamp/apps/phpsysinfo3.1.12/”到Alias /phpmyadmin“c:/wamp/apps/phpmyadmin4.1.14/”
  7. change <Directory c:/wamp/apps/phpsysinfo3.1.12/ /> to <Directory c:/wamp/apps/phpmyadmin4.1.14/ />
  8. 将 <目录c: wamp apps phpsysinfo3.1.12> 改为 <目录c: wamp apps phpmyadmin4.1.14>

its worked for me.

它为我工作。

#6


0  

My solution was that 2 .dll files(msvcp110.dll, msvcr110.dll) were missing from the directory : C:\wamp\bin\apache\apache2.4.9\bin So I copied these 2 files to all these locations just in case and restarted wamp it worked C:\wamp C:\wamp\bin\apache\apache2.4.9\bin C:\wamp\bin\apache\apache2.4.9 C:\wamp\bin\mysql\mysql5.6.17 C:\wamp\bin\php\php5.5.12

我的解决方案是2 .dll文件(msvcp110)。我把这两个文件复制到所有这些地方,以防万一,并重新启动它

I hope this helps someone out.

我希望这能帮助别人。

#7


0  

I just search this solution, but can't find. Then I solved that by check some parts on wamp in my laptop.

我只是搜索这个解,但是找不到。然后我通过检查我笔记本上wamp的一些部件来解决这个问题。

We know that apache server runs with :80 port by default. Your PC have already used this port by another services. So, first

我们知道apache服务器默认使用:80端口运行。您的PC已经被其他服务使用了这个端口。所以,首先

  1. Click on wamp icon->Apache->Service->Test Port 80
  2. 单击wamp图标->Apache->服务->测试端口80

Then u can find the service which can use :80 port.

然后你可以找到可以使用的服务:80端口。

  OR
  1. Go to "control panel-> Programs and features-> Turn Windows features on or off ". And unchecke right on "Internet Information Service". Then Restart your PC.
  2. 去“控制面板->程序和功能->打开或关闭窗口功能”。并取消“互联网信息服务”的登记。然后重新启动你的电脑。

Problem was solved.

问题已经解决了。

#8


0  

My solution on Windows 10 was just to stop IIS (Internet Information Services).

我在Windows 10上的解决方案就是停止IIS (Internet信息服务)。

#9


0  

If Apache is installed as a Windows service, any errors will show up in the Windows System event log. To view the System event log, navigate to Windows Administrative Tools->Event Viewer and open the System log in the Windows Logs folder. Or, you can see the same errors by running httpd.exe at the command line. In my case, httpd.exe is located here: C:\Bitnami\wampstack-5.6.26-2\apache2\bin.

如果Apache被安装为Windows服务,那么任何错误都将显示在Windows系统事件日志中。要查看系统事件日志,请导航到Windows管理工具——>事件查看器,并在Windows Logs文件夹中打开系统日志。或者,您可以通过运行httpd看到相同的错误。exe在命令行。在我的例子中,httpd。exe位于这里:C:\Bitnami\wampstack-5.6.26-2\apache2\bin。

If there is a problem with starting Apache, most likely the problem can be fixed by editing the httpd.conf file located in the \apache2\conf folder. As already suggested, you can check the syntax of the httpd.conf file by running httpd.exe -t at the command line.

如果在启动Apache时出现问题,那么通过编辑httpd可以解决这个问题。位于\apache2\conf文件夹中的conf文件。如前所述,您可以检查httpd的语法。通过运行httpd conf文件。exe -t在命令行。

I found that the I had to

我发现我必须这么做

Change SetEnv PATH "C:\Bitnami\wampstack-5.6.26-2\apache2\bin;${PATH}" in httpd.conf

改变SetEnv路径“C:\Bitnami\wampstack-5.6.26-2\apache2\bin;${PATH}

to

SetEnv PATH "C:\Bitnami\wampstack-5.6.26-2\apache2\bin;%PATH%"

SetEnv路径“C:\ Bitnami这样\ wampstack-5.6.26-2 \输入\ bin,% %”

#10


0  

I had the same problem. My port 80 was not in use.

我也有同样的问题。我的端口80没有使用。

After thorough research, all I did was to download Update for Universal C Runtime.

在深入研究之后,我所做的就是下载Universal C运行时的Update。

Once installed and my PC restarted, all was OK.

安装完毕,我的电脑重新启动,一切正常。

#11


0  

I was having the same problem, the mysql service was starting but not the apache service, the main problem about that is one of your virtual hosts isn't config. correctly, all i did was deleted the virtual host that i created "D:\wamp\bin\apache\apache2.4.23\conf\extra\httpd-vhosts, restarted all services apache service started working correctly and so i just went to localhost and added a virtual host automatically and so it worked!!

我遇到了同样的问题,mysql服务开始了但不是apache服务,主要的问题是你的虚拟主机不是配置。正确的是,我所做的只是删除了我创建的虚拟主机“D:\wamp\bin\apache\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

#12


-1  

Sometimes it is Skype or another application "Holding" on to port 80. Jusct close Skype

有时是Skype或其他应用程序“坚持”到端口80。Jusct关闭Skype