Hello serverfault community.
I'm setting up a nextcloud server, but apache is not starting.
When I run systemctl status apache2
I get:
● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2021-02-03 12:13:29 CET; 2min 19s ago Docs: https://httpd.apache.org/docs/2.4/ Process: 16936 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
feb 03 12:13:29 alumno-VirtualBox systemd[1]: Starting The Apache HTTP Server... feb 03 12:13:29 alumno-VirtualBox apachectl[16949]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 feb 03 12:13:29 alumno-VirtualBox apachectl[16949]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 feb 03 12:13:29 alumno-VirtualBox apachectl[16949]: no listening sockets available, shutting down feb 03 12:13:29 alumno-VirtualBox apachectl[16949]: AH00015: Unable to open logs feb 03 12:13:29 alumno-VirtualBox apachectl[16936]: Action 'start' failed. feb 03 12:13:29 alumno-VirtualBox apachectl[16936]: The Apache error log may have more information. feb 03 12:13:29 alumno-VirtualBox systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE feb 03 12:13:29 alumno-VirtualBox systemd[1]: apache2.service: Failed with result 'exit-code'. feb 03 12:13:29 alumno-VirtualBox systemd[1]: Failed to start The Apache HTTP Server.
I believe these would be the errors:
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
When I run sudo netstat -ltnp | grep :80
I get:
tcp6 0 0 :::80 :::* LISTEN 3213/httpd
As seen here httpd is running on tcp6, and I think this could be a potential problem. Any ideas?
Thanks in advance and let me know if you need additional information.
Edit: The problem is solved but I did nothing to solve it. Sorry if this doesn't help but I really don't know how any of this happened