If you are trying to install apache2 webserver as we mentioned in our another post “How to install Apache webserver on Ubuntu ?” there are chances that you may see an error like “systemd[1]: Failed to start The Apache HTTP Server.” in a red color on command line as below, Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details. invoke-rc.d: initscript apache2, action "start" failed.
Execution & Command Syntax
systemctl status apache2sudo netstat -nap | grep 80 In our Desktop, we had “lighthttpd” installed and running which was causing this problem, so we used below command to identify it as, $ ps -ax | grep httpd 6165 ? Ss 0:00 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpdRisk level: caution. Review the command before running it.
sudo /etc/initRisk level: caution. Review the command before running it.
Technical Implementation Details
● apache2.service - The Apache HTTP Server 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 Mon 2020-05-18 23:42:39 IST; 6ms ago Process: 5424 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE) May 18 23:42:39 devlab apachectl[5424]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message May 18 23:42:39 devlab apachectl[5424]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 May 18 23:42:39 devlab apachectl[5424]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 May 18 23:42:39 devlab apachectl[5424]: no listening sockets available, shutting down May 18 23:42:39 devlab apachectl[5424]: AH00015: Unable to open logs May 18 23:42:39 devlab apachectl[5424]: Action 'start' failed. May 18 23:42:39 devlab apachectl[5424]: The Apache error log may have more information. May 18 23:42:39 devlab systemd[1]: apache2.service: Control process exited, code=exited status=1 May 18 23:42:39 devlab systemd[1]: apache2.service: Failed with result 'exit-code'. May 18 23:42:39 devlab systemd[1]: Failed to start The Apache HTTP Server. Solution Its possible that you may already have some other webserver running on your website which is using port 80, hence it was showing an error as “Address already in use: : make_sock: could not bind to address” so we have to identify which application is using this port 80 and stop this application so as we can install apache2.
Gotchas and Common Issues
Permission Verification - confirm execution permissions and path variables before invoking system binaries.
Version Compatibility - check software version release notes for deprecated flags or syntax changes.
Log Monitoring - inspect system logs (
journalctlor/var/log) to troubleshoot execution failures.
Following these steps ensures clean configuration, proper security boundaries, and reliable execution for solved: systemd[1]: failed to start the apache http server..
Comments and corrections