Apache2 Error | Job for apache2.service failed because the control process exited with error code.

0x00 前言

        在使用 kali 系统自带的 apache2 服务时出现因为控制进程退出无法启动的报错。

         

        

0x01 原因分析

        因为我的环境都是正常没有碰过,而 apache2 服务端口号默认为 80 ,很有可能是将端口号占用导致的无法正常启动。

        

        

0x02 解决过程

Ⅰ.检查80端口号使用情况,发现80端口号被占用

netstat -lnp | grep 80

         

Ⅱ.清除此进程

kill -9 292614

        

Ⅲ.重新启动apache2服务进行验证

┌──(root㉿kali)-[~]
└─# service apache2 start 

service apache2 start

Ⅲ.检查apache2启动状态

┌──(root㉿kali)-[~]
└─# service apache2 status                                                       
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; disabled; vendor preset: disabl>
     Active: active (running) since Fri 2022-10-14 09:56:23 CST; 15min ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 294887 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 294892 (apache2)
      Tasks: 6 (limit: 2231)
     Memory: 14.4M
        CPU: 92ms
     CGroup: /system.slice/apache2.service
             ├─294892 /usr/sbin/apache2 -k start
             ├─294894 /usr/sbin/apache2 -k start
             ├─294895 /usr/sbin/apache2 -k start
             ├─294896 /usr/sbin/apache2 -k start
             ├─294897 /usr/sbin/apache2 -k start
             └─294898 /usr/sbin/apache2 -k start

10月 14 09:56:23 kali systemd[1]: Starting The Apache HTTP Server...
10月 14 09:56:23 kali apachectl[294891]: AH00558: apache2: Could not reliably determine t>
10月 14 09:56:23 kali systemd[1]: Started The Apache HTTP Server.
lines 1-20/20 (END)

service apache2 start

        

        

0x03 总结

至此关于apache2因为控制进程退出无法启动问题解决。由于作者水平有限,文中若有错误与不足欢迎留言,便于及时更正。


版权声明:本文为m0_51191308原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。