I'm unable to run sudo service apache2 restart
on my sever. Inorder to troubleshoot this when I execute sudo systemctl status apache2.service
and I get the following log.
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Sat 2019-12-07 13:04:25 UTC; 7min ago
Process: 17357 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
apachectl[17357]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using www.domainname.
apachectl[17357]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
apachectl[17357]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
apachectl[17357]: no listening sockets available, shutting down
apachectl[17357]: AH00015: Unable to open logs
apachectl[17357]: Action 'start' failed.
apachectl[17357]: The Apache error log may have more information.
systemd[1]: apache2.service: Control process exited, code=exited status=1
systemd[1]: apache2.service: Failed with result 'exit-code'.
systemd[1]: Failed to start The Apache HTTP Server.
How can I resolve this issue ?
NOTE : the actual domain name is replaced with domainname.