My apache2 had the following error:
root@Aspire3:/etc/apache2# systemctl status apache2
● 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 Thu 2020-10-08 20:42:23 -03; 4min 48s ago
Process: 24443 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
out 08 20:42:23 Aspire3 apachectl[24443]: 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
out 08 20:42:23 Aspire3 apachectl[24443]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
out 08 20:42:23 Aspire3 apachectl[24443]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
out 08 20:42:23 Aspire3 apachectl[24443]: no listening sockets available, shutting down
out 08 20:42:23 Aspire3 apachectl[24443]: AH00015: Unable to open logs
out 08 20:42:23 Aspire3 apachectl[24443]: Action 'start' failed.
out 08 20:42:23 Aspire3 apachectl[24443]: The Apache error log may have more information.
out 08 20:42:23 Aspire3 systemd[1]: apache2.service: Control process exited, code=exited status=1
out 08 20:42:23 Aspire3 systemd[1]: apache2.service: Failed with result 'exit-code'.
out 08 20:42:23 Aspire3 systemd[1]: Failed to start The Apache HTTP Server.
Then I found this response and it worked! But whenever I restart my computer, Apache returns to this error and I have to run these commands again. Does anyone know how to solve? I use Ububtu 18.04