XAMPP - Apache 无法启动 - 尝试启动 Apache 服务 [英] XAMPP - Apache could not start - Attempting to start Apache service

查看:36
本文介绍了XAMPP - Apache 无法启动 - 尝试启动 Apache 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试使用 XAMPP 启动 Apache 时,我在 XAMPP UI 中收到 - 正在尝试启动 Apache 服务..." 消息.没有更多详细信息.

While trying to start Apache using XAMPP, I was receiving - "Attempting to start Apache service..." message in XAMPP UI. No further details were available.

在哪里可以看到日志(我以管理员身份运行 XAMPP)?

Where can I see the logs (I was running XAMPP as Admin) ?

推荐答案

我意识到这是一个端口问题,因为我在我的机器上运行 IIS 和其他 Web 服务器.但我更感兴趣的是在 UI 中看到带有端口号的详细错误消息.

I realized it was a port issue since I was running IIS and other web servers in my machine. But I was more interested to see a detailed error message with the port number in the UI.

似乎它没有记录在 UI 或日志文件中(至少在我的情况下),而是在事件查看器中(控制面板 -> 查看事件日志).在 Even 查看器 -> Windows 日志 -> 应用程序

Seems like it was not logged in the UI or log file (at least in my case), but in the Event viewer (Control panel -> View Event Logs). Under the Even viewer -> Windows Logs -> Application

我可以看到类似于以下的权限错误:

I could see a permission error something like the below one:

试图以访问权限禁止的方式访问套接字.:AH00072:make_sock:无法绑定到地址 0.0.0.0:443

An attempt was made to access a socket in a way forbidden by its access permissions. : AH00072: make_sock: could not bind to address 0.0.0.0:443

要解决此 SSL 端口权限问题,请更改 httpd-ssl.conf 中的以下行 (C:\xampp\apache\conf\extra)

To fix this permission issue for SSL port, Please change the below line in httpd-ssl.conf (C:\xampp\apache\conf\extra)

 # When we also provide SSL we have to listen to the 
 standard HTTP port (see above) and to the HTTPS port

     Listen xxx

将 XXX 替换为您机器中打开的任何有效端口号

Replace XXX with any valid port number that is open in your machine

如果您遇到端口 80 的问题,请更改 httpd.conf 文件 (C:\xampp\apache\conf)

If you are having issues with Port 80, then change the httpd.conf file (C:\xampp\apache\conf)

# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
 Listen 127.0.0.1:8000

我还总结了我遇到的其他解决方案:

I have also summarized other solutions that I came across:

  1. Skype 通常会阻止 Apache 端口.所以终止它并重试.
  2. 找到使用阻塞端口 (netstat -ano) 的进程 ID (PID) 并在 Windows 任务管理器中终止相应进程.

这篇关于XAMPP - Apache 无法启动 - 尝试启动 Apache 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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