Error when trying to reload:
r1@prime:~$ sudo systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-11-25 01:04:32 EET; 47min ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 5392 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
ноя 25 01:04:32 prime apachectl[5392]: no listening sockets available, shutting down
ноя 25 01:04:32 prime apachectl[5392]: AH00015: Unable to open logs
ноя 25 01:04:32 prime apachectl[5392]: Action 'start' failed.
ноя 25 01:04:32 prime apachectl[5392]: The Apache error log may have more information.
ноя 25 01:04:32 prime systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
ноя 25 01:04:32 prime systemd[1]: apache2.service: Failed with result 'exit-code'.
ноя 25 01:04:32 prime systemd[1]: Failed to start The Apache HTTP Server.
ноя 25 01:04:35 prime systemd[1]: apache2.service: Unit cannot be reloaded because it is inactive.
ноя 25 01:16:54 prime systemd[1]: apache2.service: Unit cannot be reloaded because it is inactive.
ноя 25 01:42:04 prime systemd[1]: apache2.service: Unit cannot be reloaded because it is inactive.
r1@prime:~$
How to fix it?
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.
Hi @rulet,
Looking at the provided status, the error can be explained here
This would suggest Apache can’t start as something else is listening on the ports it’s supposed to. Usually Apache listens on port 80 so you’ll need to first check what is actually listening on it.
To do so, you’ll just need to enter this command
This will result in a similar ouput
In this case, Apache is actually properly running however in your cases something else would be listening on that port.
You’ll need to turn off the service that’s listening on the port. Edit it’s configuration to use another port and restart Apache.
That should be it.
Regards, KDSys