Not able to restart Apache2
The error is stating something is already bound to port 80. There is a default site configuration file in /etc/apache2/sites-available that binds on port 80. This is probably the file you want to edit for binding and not using the /etc/apache2/apache.conf file. If you defined something in apache.conf then it is conflicting with the 000-default.conf file and that is why it is refusing to load.
Related videos on Youtube
Ellian Carlos
Updated on September 18, 2022Comments
-
Ellian Carlos over 1 year
I've been trying to start/restart Apache2 and been getting the same error over and over. Already look up in many questions or problems, but no one was able to solve my problem. Using Ubuntu 18.04 with Apache2 and php7.0.
So, the problem is that when I execute the comand:
/etc/init.d/apache2 restart
I get this error:
Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details. failed!
Executing:
systemctl status --no-pager --full apache2
Returns:
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 Mon 2018-10-15 16:05:21 -03; 2min 43s ago Process: 529 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE) out 15 16:05:21 ellian-Lenovo-ideapad-320-15IKB apachectl[529]: 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 out 15 16:05:22 ellian-Lenovo-ideapad-320-15IKB apachectl[529]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 out 15 16:05:22 ellian-Lenovo-ideapad-320-15IKB apachectl[529]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 out 15 16:05:22 ellian-Lenovo-ideapad-320-15IKB apachectl[529]: no listening sockets available, shutting down out 15 16:05:22 ellian-Lenovo-ideapad-320-15IKB apachectl[529]: AH00015: Unable to open logs out 15 16:05:21 ellian-Lenovo-ideapad-320-15IKB systemd[1]: apache2.service: Control process exited, code=exited status=1 out 15 16:05:22 ellian-Lenovo-ideapad-320-15IKB apachectl[529]: Action 'start' failed. out 15 16:05:22 ellian-Lenovo-ideapad-320-15IKB apachectl[529]: The Apache error log may have more information. out 15 16:05:21 ellian-Lenovo-ideapad-320-15IKB systemd[1]: apache2.service: Failed with result 'exit-code'. out 15 16:05:21 ellian-Lenovo-ideapad-320-15IKB systemd[1]: Failed to start The Apache HTTP Server.
Already try to modify the apache2.conf to fit same answers for look alike questions, but It doesn't work. I'm a newbie in Linux/Ubuntu. I used to execute local servers with Xampp or Wampp, but already try to install those in Ubuntu without sucess.
-
Ellian Carlos over 5 yearsWorked just fine, but I also had to alterate the ports.conf file. Thanks.
-
SteamerJ over 5 yearsAwesome, glad you got it sorted!
-
rulet over 4 yearsCan you describe more exactly what do you mean(on example)?