[mpm_winnt:error] [pid 5200:tid 456] (OS 2)系统找不到指定的文件。 : AH00436: No installed service named “Apach

在注册服务成功后,在命令行使用 httpd -k start 会说找不到这个服务,好奇怪,应为我注册服务的时候是写的 httpd -k install -n Apache2.47 成功注册系统服务,但却找不到


 

C:\Users\ccsec>httpd  -k restart
[Sun May 23 10:44:51.159016 2021] [mpm_winnt:error] [pid 5200:tid 456] (OS 2)系统找不到指定的文件。  : AH00436: No installed service named "Apache2.4".


 

反复验证后发现 注册httpd -k install -n Apache2.4 就可以找到服务。好吧

D:\Win10-IT\Apache-2.4.47-vs16\bin>sc delete Apache2.47
[SC] DeleteService 成功
#删除不对的服务名重新注册 Apache2.4
D:\Win10-IT\Apache-2.4.47-vs16\bin>httpd -k install -n Apache2.4
Installing the 'Apache2.4' service
The 'Apache2.4' service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
#上面的errors 可以忽略,查过些资料认为只是提升作用
#再次启动好了不报错了
C:\Users\ccsec>httpd  -k restart
C:\Users\ccsec>

大概在 httpd  -k 的逻辑代码里给写定了是 Apache2.4 。。。

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值