0
votes

When i start apache2 it fails and i get this error. My last change was in the /etc/apache2/mods-enabled/dir.conf file, where i put index.php first of the list. However, i have reinstalled the apache for get the default files and the error keep being.

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

And when i look inside journalctl, the details shows the next:

apache error log

I dont know how can i solve the problem, i tried with ServerName localhost at httpd.conf file and another tips but keep failing. Thanks

1
As the log says, it is failing because something is already using port 80. Is there another Apache instance already running, or are you also running nginx? Have you tried restarting the whole system if you can't manage to shutdown whatever existing server process is using the same port?Graham Dumpleton

1 Answers

0
votes

Ok, i solved it. The problem was that i had nginx container listening where apache does want too. The solution is: look for processes listening at port 80 with

sudo lsof -i:80

And then, kill all processes with

sudo kill -9 processes

Thanks