我最近第一次安装了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服务器。有人能帮上忙吗?
发布于 2021-01-16 15:41:56
在某些情况下,您的网络管理员或ISP会阻止某些端口(尽管我不建议将Xampp作为可公开访问的服务器运行)。
端口80被一些其他应用程序使用,如Skype等。当您想要同时访问Apache和这些应用程序时,可能会因此问题而发生一些冲突。您可以选择更改Apache服务器的端口号
如果您的Apache服务器不工作,则表明某些其他应用程序正在使用端口80
让我们手动完成。步骤1:对于此过程,首先打开httpd.conf文件,该文件位于xampp\apache\conf\
在我的系统中,我的xampp安装在c驱动器中,所以我的路径是c:\xampp\apache\conf
您的可能与此不同,所以现在使用文本编辑器或程序员编辑器(我使用的是notepad++)打开httpd.conf文件,找到显示为Listen 80的行。它是第47行,或者按contol+f并键入80,然后它会自动将courser移到这里,然后将80更改为您自己的端口,这里我使用3388。之后,按control+s保存文件。成功保存后,重新启动Apache服务器,您的端口号就成功更改了
发布于 2017-04-08 00:32:13
这个问题可能有很多可能的答案。最常见的是运行在端口80上的另一个程序。我也遇到了同样的问题,然后我发现我的Vagrant机器在80端口上运行。
如果您的计算机上安装了skype,则将apache的端口更改为其他端口。
为此,请转到xampp/apache/conf/httpd.conf并在httpd.conf中更改以下行:
ServerName localhost:80至
ServerName localhost:81此外,如果它不起作用,也可以更改下面这一行:
Listen 80
to
Listen 81发布于 2021-01-16 14:21:33
有时,这个错误是由于你的计算机上的其他软件使用了相同的端口,所以你应该改变端口号或从其他软件如虚拟盒子等禁用相同的端口。
https://stackoverflow.com/questions/43282779
复制相似问题