Question

Apache won't start

Tried adding another apache virtual host, but it didn’t work and the apache server went down and wont restart. I’ve since removed the newly added host…

The output of “systemctl status apache2.service”:

● 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 Fri 2020-05-29 21:44:15 UTC; 17s ago
  Process: 6898 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Output from “sudo systemctl status apache2.service”

● 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 Fri 2020-05-29 21:39:04 UTC; 1min 38s ago
  Process: 6477 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

May 29 21:39:04 ubuntu-s-6vcpu-16gb-nyc1-01 apachectl[6477]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.May 29 21:39:04 ubuntu-s-6vcpu-16gb-nyc1-01 apachectl[6477]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
May 29 21:39:04 ubuntu-s-6vcpu-16gb-nyc1-01 apachectl[6477]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
May 29 21:39:04 ubuntu-s-6vcpu-16gb-nyc1-01 apachectl[6477]: no listening sockets available, shutting down
May 29 21:39:04 ubuntu-s-6vcpu-16gb-nyc1-01 apachectl[6477]: AH00015: Unable to open logs
May 29 21:39:04 ubuntu-s-6vcpu-16gb-nyc1-01 apachectl[6477]: Action 'start' failed.
May 29 21:39:04 ubuntu-s-6vcpu-16gb-nyc1-01 apachectl[6477]: The Apache error log may have more information.
May 29 21:39:04 ubuntu-s-6vcpu-16gb-nyc1-01 systemd[1]: apache2.service: Control process exited, code=exited status=1
May 29 21:39:04 ubuntu-s-6vcpu-16gb-nyc1-01 systemd[1]: apache2.service: Failed with result 'exit-code'.
May 29 21:39:04 ubuntu-s-6vcpu-16gb-nyc1-01 systemd[1]: Failed to start The Apache HTTP Server.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

this error is popping because port 80 is already occupied by other eg:nginx, if nginx is already installed in your system,

you can stop the service by running below command.

service nginx stop

and restart apache2 and postgresql by following command #systemctl restart postgresql #systemctl restart apache2

if you need confirmation for apache running #systemctl status apache2.service

#forgive me for my poor english or sentence formation

Hello, @mattGiantSquid

As you can see from the message itself:

Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

The configuration is failing because there are Duplicated Listen entries in the Apache configuration file. You might have declared Listen 80 twice in the configuration file and thus causing the issue.

You might want to check out if you have password on the cert.key as this might cause an issue like this one, you can find more information here:

https://ubuntuforums.org/showthread.php?t=1636667

Let me know how it goes.

Regards, Alex