Apache2服务器无法启动

时间:2020-06-21 07:44:21

标签: apache2 ubuntu-18.04

由于某种原因,我的apache2已停止工作。
我尝试卸载它,问题仍然存在。
这是我尝试过的一些命令及其结果,可能会帮助您:-

“ sudo systemctl status apache2”:-

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: 
   Active: failed (Result: exit-code) since Sun 2020-06-21 12:56:28 IST; 7min ag
     Docs: https://httpd.apache.org/docs/2.4/

Jun 21 12:56:21 kabir systemd[1]: Starting The Apache HTTP Server...
Jun 21 12:56:28 kabir apachectl[1086]: AH00558: apache2: Could not reliably dete
Jun 21 12:56:28 kabir apachectl[1086]: (98)Address already in use: AH00072: make
Jun 21 12:56:28 kabir apachectl[1086]: no listening sockets available, shutting 
Jun 21 12:56:28 kabir apachectl[1086]: AH00015: Unable to open logs
Jun 21 12:56:28 kabir apachectl[1086]: Action 'start' failed.
Jun 21 12:56:28 kabir apachectl[1086]: The Apache error log may have more inform
Jun 21 12:56:28 kabir systemd[1]: apache2.service: Control process exited, code=
Jun 21 12:56:28 kabir systemd[1]: apache2.service: Failed with result 'exit-code
Jun 21 12:56:28 kabir systemd[1]: Failed to start The Apache HTTP Server.

“ sudo systemctl restart apache2”:-

Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

netstat -an | grep“:80”

tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN     
tcp        0      0 192.168.43.128:33944    117.18.237.29:80        TIME_WAIT  
tcp        0      0 192.168.43.128:33864    117.18.237.29:80        ESTABLISHED
tcp        0      0 192.168.43.128:34524    23.217.53.84:80         ESTABLISHED
tcp        0      0 192.168.43.128:54364    172.217.166.163:80      ESTABLISHED
tcp        0      0 192.168.43.128:54206    172.217.166.163:80      TIME_WAIT  
tcp        0      0 192.168.43.128:33946    117.18.237.29:80        ESTABLISHED
tcp        0      0 192.168.43.128:34522    23.217.53.84:80         ESTABLISHED
tcp6       0      0 :::80                   :::*                    LISTEN 

“ sudo apachectl开始”:-

Invoking 'systemctl start apache2'.
Use 'systemctl status apache2' for more info.
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
Action 'start' failed.
The Apache error log may have more information.

1 个答案:

答案 0 :(得分:0)

检查您的配置,因为该错误将表明您已经对同一端口具有侦听指令。

sudo vim /etc/apache2/ports.conf [On Debian/Ubuntu]

sudo vim /etc/httpd/conf/httpd.conf [On RHEL/CentOS]

检查您需要的端口上没有监听。