我刚刚安装了 XAMPP,除了无法运行 apache 之外,一切正常。看来端口 80 是问题所在,我已禁用 Skype 使用端口 80,但似乎没有解决问题。我在某处读到 SSL 端口可能是问题所在,应该进行更改。但我不知道端口是什么或如何更改它。
"Check the "/xampp/apache/logs/error.log" file"
我尝试检查此文件,但“日志”内没有任何内容。从 apache 我可以转到错误,但没有任何最近更改的文档。
错误:
20:34:24 [Apache] Problem detected!
20:34:24 [Apache] Port 80 in use by "system"!
20:34:24 [Apache] Apache WILL NOT start without the configured ports free!
20:34:24 [Apache] You need to uninstall/disable/reconfigure the blocking application
20:34:24 [Apache] or reconfigure Apache to listen on a different port
20:40:50 [Apache] Attempting to start Apache app...
20:40:50 [Apache] Status change detected: running
20:40:51 [Apache] Status change detected: stopped
20:40:51 [Apache] Error: Apache shutdown unexpectedly.
20:40:51 [Apache] This may be due to a blocked port, missing dependencies,
20:40:51 [Apache] improper privileges, a crash, or a shutdown by another method.
20:40:51 [Apache] Check the "/xampp/apache/logs/error.log" file
20:40:51 [Apache] and the Windows Event Viewer for more clues
如何修复这些错误?
最佳答案
如果您只想让 Apache 运行而不介意它在哪个端口上运行,请执行以下操作:
在 XAMPP 控制面板中,单击“日志”按钮旁边的 Apache -“配置”按钮。
从下拉列表中选择“Apache (httpd.conf)”。 (记事本应该打开)
按 Ctrl + F 查找“80”。单击“查找下一个”三次,并将行 Listen 80
更改为 Listen 8080
再次单击“查找下一个”几次,直到看到行 ServerName localhost:80
将其更改为 ServerName localhost:8080
执行 Ctrl + S 保存并退出记事本。
在XAMPP控制面板中再次启动Apache,Apache应该成功运行。
在浏览器地址栏中使用 http://localhost:8080/
检查一切是否正常。
编辑
此外,您在运行 IIS 时可能会遇到运行 XAMPP 的问题。如果您正在运行 IIS,可能值得停止该服务然后启动 XAMPP。
关于Apache 无法在 xampp 中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14245474/