我在我的电脑上安装了XAMPP。我正在尝试从XAMPP控制面板运行Apache。
我通过右键单击快捷方式并选择“以管理员身份运行”来启动XAMPP控制面板(我已经登录到具有管理员特权的帐户)。控制面板启动,一切似乎正常(没有错误消息/警告)。
当我点击Apache旁边的Start按钮时,出现以下错误消息:
2:22:44 PM [Apache] Attempting to start Apache app...
2:22:45 PM [Apache] Status change detected: running
2:22:45 PM [Apache] Status change detected: stopped
2:22:45 PM [Apache] Error: Apache shutdown unexpectedly.
2:22:45 PM [Apache] This may be due to a blocked port, missing dependencies,
2:22:45 PM [Apache] improper privileges, a crash, or a shutdown by another method.
2:22:45 PM [Apache] Check the "/xampp/apache/logs/error.log" file
2:22:45 PM [Apache] and the Windows Event Viewer for more clues
注意,它告诉我Apache意外关闭了,并要检查error.log文件和Windows事件查看器。
我检查了error.log文件,但是它是空的:
我还使用Windows事件查看器检查了任何事件,但是事件查看器显示没有事件(在应用程序下):
我已经检查了可能阻止端口的程序等等(如Skype、Visual SVN Server),并关闭了可能导致问题的任何程序。
还有其他办法可以找出可能发生的情况吗?
谢谢。
更新
我尝试从DOS命令提示符运行apache来找出问题。从命令提示符运行会给我特定的错误以及这些错误所在的httpd.conf文件中的位置。事实证明,我的ServerRoot和DocumentRoot值不正确(指向错误的目录)。我将它们更改为指向正确的目录,现在我可以从控制面板启动apache。
奇怪的是,当我从控制面板启动时,为什么没有看到有关ServerRoot和DocumentRoot的错误消息?