Apache2 "Failed to start The Apache HTTP Server"
Andrew Mclaughlin
Hi everyone I have a problem on Apache2 (on ubuntu). My server does not starts up and when I enter systemctl status apache2.service I see this;
● 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 Sat 2019-01-12 13:11:24 +03; 22min ago Process: 7336 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Jan 12 13:11:24 lvlzyro apachectl[7336]: 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
Jan 12 13:11:24 lvlzyro apachectl[7336]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Jan 12 13:11:24 lvlzyro apachectl[7336]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Jan 12 13:11:24 lvlzyro apachectl[7336]: no listening sockets available, shutting down
Jan 12 13:11:24 lvlzyro apachectl[7336]: AH00015: Unable to open logs
Jan 12 13:11:24 lvlzyro apachectl[7336]: Action 'start' failed.
Jan 12 13:11:24 lvlzyro apachectl[7336]: The Apache error log may have more information.
Jan 12 13:11:24 lvlzyro systemd[1]: apache2.service: Control process exited, code=exited status=1
Jan 12 13:11:24 lvlzyro systemd[1]: apache2.service: Failed with result 'exit-code'.
Jan 12 13:11:24 lvlzyro systemd[1]: Failed to start The Apache HTTP Server. 2 Answers
Most likely either Apache or another webserver (e.g. nginx) is already running. To check for that, grep the process list for apache, httpd and nginx or use netstat -anp | grep ':80\s' to find out.
After you have understood which process uses port 80, you can decide if you want to terminate it or if you have an unsupported configuration and can't use Apache on port 80
1You need to disable firewall and then restart PC
code: sudo ufw disable