我刚刚重新安装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
我怎么解决这个问题?
遵循以下步骤:
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。
你可以采用上面提到的解决方案。这个问题可以通过修改你的“httpd.conf”(C:\xampp\apache\conf\httpd.conf)文件和“httpd-ssl.conf”(C:\xampp\apache\conf\extra\httpd-ssl.conf)文件来解决。
如果问题仍然存在,你可以检查你的skype端口。
But in my case this was different. I had to make changes in "server.crt"(C:\xampp\apache\conf\ssl.crt\server.crt) file.Try running your xammp apache from the command line in administration mode.
"C:\xampp\apache\bin\httpd.exe"
This will give you the errors -in which file and -which line. Likewise, I had an error in server.crt file which was blank.
If you have xammp running in any other system, just copy the contents of this file(C:\xampp\apache\conf\ssl.crt\server.crt) and paste in your server.crt file and You are Done!
感谢和问候
阿卡纳
如果更改端口不能解决上述建议的问题,并且如果您可能玩弄了文件目录结构(例如,在安装后更改文件夹的名称,就像我所做的那样),那么您可以尝试这样做,
打开XAMPP控制面板,点击Apache的“配置”
选择Apache (httpd.conf)
在打开的编辑器中,按CTRL+H找到旧文件夹名的所有实例,并用新文件夹名替换它。
例如,在我的例子中,我已经将XAMPP的主安装文件夹名称从Xam更改为XAMPP
在编辑器中修改如下:
Define SRVROOT "G:/Xam/apache"
ServerRoot "G:/Xam/apache"
DocumentRoot "G:/Xam/htdocs"
<Directory "G:/Xam/htdocs">
To
Define SRVROOT "G:/Xampp/apache"
ServerRoot "G:/Xampp/apache"
DocumentRoot "G:/Xampps/htdocs"
<Directory "G:/Xampps/htdocs">
在编辑器中还有许多其他这样的实例,只需找到并替换它们中的每一个。
对Apache (httpd-ssl.conf)也执行同样的操作。