繁体   English   中英

无法在 xamp 服务器中启动 Apache 模块

[英]Unable to start Apache module in xamp server

我最近第一次安装了xamp服务器,想在本地服务器上运行一个php网站。 当我在 xamp 服务器中启动 Apache 模块时,它显示以下错误,但 MySQL 启动并运行良好:

9:04:58 PM  [Apache]    Attempting to start Apache app...
9:04:58 PM  [Apache]    Status change detected: running
9:04:58 PM  [Apache]    Status change detected: stopped
9:04:58 PM  [Apache]    Error: Apache shutdown unexpectedly.
9:04:58 PM  [Apache]    This may be due to a blocked port, missing dependencies, 
9:04:58 PM  [Apache]    improper privileges, a crash, or a shutdown by another method.
9:04:58 PM  [Apache]    Press the Logs button to view error logs and check
9:04:58 PM  [Apache]    the Windows Event Viewer for more clues
9:04:58 PM  [Apache]    If you need more help, copy and post this
9:04:58 PM  [Apache]    entire log window on the forums

我这样做是为了我的软件测试任务。 我必须在本地服务器上测试一个网站,为此我安装了 xamp 服务器。 任何人都可以帮忙吗?

在某些情况下,您的网络管理员或 ISP 会阻止某些端口(尽管我不建议将 Xampp 作为可公开访问的服务器运行)。

并且端口 80 被一些其他应用程序使用,例如 Skype 等。当您想要访问 Apache 和这些应用程序时,可能会发生一些冲突,因为此问题您可以选择更改 Apache 服务器的端口号

如果您的 Apache 服务器不工作,则表明某些其他应用程序正在使用端口 80

让我们手动完成。 步骤 1:对于此过程,首先打开位于 xampp\\apache\\conf\\ 的 httpd.conf 文件

在我的系统中,我的 xampp 安装在 c 驱动器中,所以我的路径是 c:\\xampp\\apache\\conf
您的可能与此不同,因此现在使用文本编辑器或程序员编辑器打开 httpd.conf 文件(我使用的是记事本++) 现在找到显示 Listen 80 的行。它是第 47 行,否则按 contol+f 并键入 80 然后它会自动将 courser 移动到这里,然后将 80 更改为您自己的端口,这里我使用的是 3388。然后按 control+s 保存文件。 保存成功后重启Apache服务器你的端口号修改成功

对此可能有很多可能的答案。 最常见的是另一个运行在 80 端口的程序。我遇到了同样的问题,然后我发现我的 Vagrant 盒子运行在 80 端口上。

如果您的计算机上安装了 Skype,请将 apache 的端口更改为其他端口。

为此,请转到 xampp/apache/conf/httpd.conf 并更改 httpd.conf 中的以下行:

ServerName localhost:80

ServerName localhost:81

此外,如果它不起作用,请同时更改以下行:

     Listen 80
     to 
     Listen 81

有时,此错误是由于您计算机上的其他软件使用相同的端口而发生的,因此您必须更改端口号或从其他软件(如虚拟盒等)中禁用相同的端口号

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM