0

Whenever I try to restart my apache2 service it shows an error like this:

service apache2 restart Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

I thought that there might be some errors while package installation and tried sudo apt purge apache2 and then sudo apt install apache2 but that didn't solved the problem.

The log file shows:

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

ScreenShots:

  • You screenshot of the log file shows the actual problem: "Address already in use". I put that into the title of the question for you. – Stephen Ostermiller Oct 18 '18 at 10:47
1

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

This means that some service is running on port 80 already. Now, there can be two situations that I can think of.

  1. Apache has already started and you are trying to start it again. You can try with 'restart'. I guess you already did that.
  2. Another service is possibly using port 80.

Check out what services are running on TCP sockets :

sudo netstat -ntlp

Or specifically for port 80 :

sudo netstat -ntlp |grep ":80"

Depending on the result, you will have to take corrective measure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.