Question

Apache2 services failed to start after upgrade to version 2.4.51

  • Posted November 17, 2021
  • Apache

I have just upgraded apache2 to ver 2.4.51 and then the service failed to start with errors-----

● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2021-11-17 14:44:50 UTC; 9min ago
       (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Nov 17 14:44:50 voomdelivery apachectl[1791]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Nov 17 14:44:50 voomdelivery apachectl[1791]: no listening sockets available, shutting down
Nov 17 14:44:50 voomdelivery apachectl[1791]: AH00015: Unable to open log

Can any one help please to guide me on how to resolve the problems

Subscribe
Share

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

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.

Hello,

I know the question has been answered however, I want to shed some light on such situations.

Sometimes you have both Nginx and Apache installed but for some reason you are not using Nginx as a reverse proxy to Apache but rather have both but use only one. In this case, it seems that way or maybe after the Upgrade of Apache2, the default port was returned to port 80 which was already taken by Nginx.

The most descriptive error is that one:

  1. Nov 17 14:44:50 voomdelivery apachectl[1791]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

It states something is using port 80 and thus it can’t start. The check what’s going on on port 80, you can type

  1. netstat -pentul | grep 80

This will show you the process which is using the said port. Now, if you know you need this service and your application is using it, then Apache should be listening to another port. These situations are usually when you have Nginx as a reverse proxy and Apache listening on another port serving up content.

If however, you don’t need anything on that port other than Apache, then you can disable the service. To do that, you can type

  1. systemctl disable name-of-service

The above will stop the service from automatically starting up on boot and taking up the Apache port.

I have resolve the issue. I had to stop nginx and then start apache2 and then restart nginx and apache 2 was restarted successfully this time–

sudo service nginx stop sudo service apache2 start that did it