Unable to start Apache2: Job for apache2.service failed because the control process exited with error code

2.5k Views Asked by At

See "systemctl status apache2.service" and "journalctl -xe" for details. root@ip-172-31-43-5:/home/ubuntu/asterisk-18.13.0/freepbx# systemctl status apache2.service

● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2022-07-27 08:30:40 UTC; 8s ago Docs: https://httpd.apache.org/docs/2.4/ Process: 11172 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Jul 27 08:30:40 ip-172-31-43-5 systemd[1]: Starting The Apache HTTP Server... Jul 27 08:30:40 ip-172-31-43-5 apachectl[11175]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 Jul 27 08:30:40 ip-172-31-43-5 apachectl[11175]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 Jul 27 08:30:40 ip-172-31-43-5 apachectl[11175]: no listening sockets available, shutting down Jul 27 08:30:40 ip-172-31-43-5 apachectl[11175]: AH00015: Unable to open logs Jul 27 08:30:40 ip-172-31-43-5 apachectl[11172]: Action 'start' failed. Jul 27 08:30:40 ip-172-31-43-5 apachectl[11172]: The Apache error log may have more information. Jul 27 08:30:40 ip-172-31-43-5 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE Jul 27 08:30:40 ip-172-31-43-5 systemd[1]: apache2.service: Failed with result 'exit-code'. Jul 27 08:30:40 ip-172-31-43-5 systemd[1]: Failed to start The Apache HTTP Server.

1

There are 1 best solutions below

3
Uppunuthula Prashanth Goud On

uninstall apache and reinstall again

sudo apt-get install apache2 install Apache2

sudo a2enmod proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http