系统找不到指定文件 No installed service name 'Apache2'

原因:系统服务中没有apache2服务

解决方法:

开始 --运行 --- 输入“CMD”出来DOS窗口----

输入 D: 回车

再输入 cd D:/Program Files(x86)/Apache Group/Apache2/bin  定位到这个目录下(这是我的apache安装目录:找到 apache2 目录下的 bin 目录 有个apache.exe 文件,因为我们要用到apache.exe应用程序 )

再输入 apache.exe   -k   install   -n   apache2  

接着就有了apache2这个服务了~~  

如果报错
ld not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

编辑C:Program Files (x86)Apache GroupApache2confhttpd.conf

将80端口替换为8080或其它端口

输入net   start   apache2 就可以运行apache服务

输入net   stop   apache2 就关闭apache服务

原文地址:https://www.cnblogs.com/yeminglong/p/3899573.html