我正在处理一个 apache 模块,但在某些时候 Apache 拒绝启动 | 重启 | 停止。我在“services.msc”中可以看到的是:
Apache2.2 | Apache/2.2.21 (Win32) | Starting | Automatic | Local System
这是全新安装,我不知道如何强制终止。我已经多次重新启动 Windows 机器(它是一个虚拟实例),但是在弄清楚如何停止重新启动方面没有运气。
我试过了:
httpd -k stop|shutdown, but I get:
The Apache2.2 service is stopping.
Failed to stop the Apache2.2 service.
Run Code Online (Sandbox Code Playgroud)
我也关闭了 IIS。
我对无法正确响应关闭/重启请求的服务表示怀疑 - 您可能需要考虑重新安装 Apache。也就是说,我不是 Apache 人,所以我不确定这在 Windows7 下有多普遍。
除此之外,您应该能够通过任务管理器或通过命令行手动终止 httpd.exe 进程:
TASKKILL /F /IM httpd.exe /T
Run Code Online (Sandbox Code Playgroud)
命令开关指定您要终止具有映像名称“httpd.exe”(/IM httpd.exe) 的任何进程、要强制终止 (/F) 以及要终止其产生的任何子进程( /T)。
执行此操作后,您应该能够通过“服务”控制台或“net start”命令再次手动启动该进程。