我无法在我的系统Windows 7 32位上的XAMPP上启动Apache

时间:2016-03-17 09:27:53

标签: apache xampp

enter image description here

我无法在系统Windows 7 32位上通过XAMPP运行/启动Apache。问题是安装后一切正常,但Apache没有运行或启动。

收到以下错误消息: -

  

初始化控制面板Windows版本:Windows 7旗舰版32位       初始化模块......       检查模块是否存在......       检查所需的工具......       检查服务(名称=" Apache2.4"):已安装服务   错误消息:检测到错误路径的Apache服务   更改XAMPP Apache和控制面板设置或       首先手动卸载/禁用其他服务   找到路径:" C:\ Apache24 \ bin \ httpd.exe" -k runservice   预期路径:" c:\ xampp \ apache \ bin \ httpd.exe" -k

Checking default ports...
Executing "net start "Apache2.4""
Return code: 0

我认为我的系统缺少Apache 80服务器运行的端口80 - 即使我在我的系统上检查过它,但我的系统上没有这样的端口80.

如何解决此问题?

5 个答案:

答案 0 :(得分:1)

终止/退出程序,如skype和其他正在使用端口80的程序,然后启动appache server希望这将启动服务器。一旦appache服务器启动,你就可以启动skype或其他程序。
甚至你可以更改appache服务器的端口。您可以按照此链接更改服务器端口 How to change XAMPP apache server port?
跳这会对你有帮助。

答案 1 :(得分:0)

端口80是虚拟端口。它被其他一些程序使用。尝试在命令提示符下执行netsh。 最常见的问题是Skype。请参阅this问题以解决问题。

答案 2 :(得分:0)

Apache Service detected with wrong path Change XAMPP Apache and Control Panel settings or Uninstall/disable the other service manually first Found Path: "C:\Apache24\bin\httpd.exe" -k runservice Expected Path: "c:\xampp\apache\bin\httpd.exe" -k

您的回答是错误消息。已安装的apache loaction不在xampp文件夹中。尝试重新安装或更改配置。

答案 3 :(得分:0)

我在Windows 10环境中遇到了此问题。我发现我在一个不存在的虚拟主机中为C:\xampp\apache\conf\extra\httpd-xampp.conf配置了一个新的SSLCertificateFileSSLCertificateKeyFile

所以在我的httpd-xampp.conf中,我有以下内容:

## mywebsite.local config
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/mywebsite.local"
    ServerName mywebsite.local
    ServerAlias *.mywebsite.local
</VirtualHost>
<VirtualHost *:443>
    DocumentRoot "C:/xampp/htdocs/mywebsite.local"
    ServerName mywebsite.local
    ServerAlias *.mywebsite.local
    ## these lines are for my local SSL, here is the issue
    SSLEngine on
    SSLCertificateFile "crt/mywebsite.local/server.crt" ## this path may not exist
    SSLCertificateKeyFile "crt/mywebsite.local/server.key" ## or even this line may not exist
</VirtualHost>

我发现来自SSLCertificateFileSSLCertificateKeyFile的路径不存在。

我已经修复它,但是它没有用。

祝一切顺利!

答案 4 :(得分:0)

我在 Windows 10 64 位系统上遇到了完全相同的问题。我意识到我已经根据我参加的安全课程编辑了 httpd.conf 文件,这导致我的配置错误。

我的解决方法是从位于 XAMPP 文件夹中的 XAMPP 卸载程序中卸载 XAMPP,以完全删除所有相关文件以及注册表文件!这很重要,因为我之前必须这样做一次,但卸载程序由于某种原因无法正常运行。

无论如何,完全卸载它并重新安装它,保留所有默认设置使其再次工作。我知道这听起来如何……删除并重新安装,但它最终使我的服务器运行起来,因此它可以作为您和任何找到这篇文章的人的解决方案。 Image of the Apache and my SQL server running without throwing errors.

此外,我最近发现了这一点: 如果您是通过像 stackskills 这样的网站学习使用 XAMPP,这些模块可能不会提醒您注意常见问题。例如,如果您需要更改目录,从 C:/XAMPP/Apache 到 C:/Hacking Software/XAMPP/Apache,(注意目录“HackingSoftware”的第一部分中的空格和缺少下划线,XAMPP 将将第一个“空格”读作参数的结尾,因此您需要将整个目录用这样的引号写成:“C:/Hacking Software/XAMPP/Apache”或用下划线写成 C:/Hacking_Software/XAMPP /阿帕奇。

此语法也适用于“别名”命令的使用。有关详细信息,请参阅此链接:http://httpd.apache.org/docs/2.4/mod/core.html#directory

将此用作其他问题的资源:http://httpd.apache.org/docs/2.4/mod/directives.html