Whenever I check the status for XAMPP with
sudo /opt/lampp/lampp status
I get that everything is running at the moment. But when I use this command:
sudo service apache2 status
Get this output:
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 Sun 2021-12-19 17:10:06 EET; 41s ago
Process: 11150 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
Process: 16555 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Main PID: 11108 (code=exited, status=0/SUCCESS)
19 17:10:06 apachectl[16555]: AH00558: apache2: Could not reliably determine the server's fully qualified
19 17:10:06 apachectl[16555]: (98)Address already in use: AH00072: make_sock: could not bind to address [:
19 17:10:06 apachectl[16555]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.
19 17:10:06 apachectl[16555]: no listening sockets available, shutting down
19 17:10:06 apachectl[16555]: AH00015: Unable to open logs
19 17:10:06 apachectl[16555]: Action 'start' failed.
19 17:10:06 apachectl[16555]: The Apache error log may have more information.
19 17:10:06 systemd[1]: apache2.service: Control process exited, code=exited status=1
19 17:10:06 systemd[1]: apache2.service: Failed with result 'exit-code'.
19 17:10:06 systemd[1]: Failed to start The Apache HTTP Server.
Why is this happening and how to solve it?