我刚刚重新安装XAMPP,当我试图在XAMPP控制面板中启动我的Apache服务器时,我现在得到以下错误:
16:50:25 [Apache] Status change detected: running
16:50:26 [Apache] Status change detected: stopped
16:50:26 [Apache] Error: Apache shutdown unexpectedly.
16:50:26 [Apache] This may be due to a blocked port, missing dependencies,
16:50:26 [Apache] improper privileges, a crash, or a shutdown by another method.
16:50:26 [Apache] Press the Logs button to view error logs and check
16:50:26 [Apache] the Windows Event Viewer for more clues
16:50:26 [Apache] If you need more help, copy and post this
16:50:26 [Apache] entire log window on the forums
我怎么解决这个问题?
您可以做的简单的事情是检查Skype或VMware是否安装在您的机器上。
Skype使用端口80和443作为传入连接的附加端口。如果需要在Skype中修改端口号,请转
工具>连接选项>连接
在Skype窗口。现在将默认的80端口号更改为其他端口号。
VMware Workstation使用443端口进行共享。要改变这一点,打开VMware工作站,然后转到
编辑>首选项>共享虚拟机
点击“更改设置”按钮
然后点击“禁用共享”
然后更改正在使用的https端口号(443)
然后点击“启用共享”按钮
这就是你要做的。重新启动XAMPP并运行Apache服务器。
遵循以下步骤:
Open your XAMPP control panel then click its "Config"
Choose the "Apache (httpd.conf)" and find this code below and change it into this one:
#Change this to Listen on specific IP addresses as shown below
#to prevent Apache from glomming onto all bound IP addresses.
#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80
# Dynamic Shared Object (DSO) Support
Save it (Ctrl + S)
After that, go back to the XAMPP control panel and click its config again.
Choose "Apache (httpd-ssl.conf)", find this code below, and change it again:
# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"
#
#Listen 0.0.0.0:443
#Listen [::]:443
Listen 443
Save it (Ctrl + S)
Then, click the "config" (note: above the netstat) and click the "service and port settings".
Change "Main Port" to 8080 and "SSL Port" to 4433, then save it.
Finally, go to the "control panel" -> "Programs & Features" -> "Turn Windows On or Off".
Uncheck your "Internet Information Services", and then click OK.
只需等待它,您的计算机/笔记本电脑将自动重新启动,并尝试再次打开XAMPP控制面板,然后启动Apache。