sudo systemctl start httpd Job for httpd.service failed because the control process exited with error code.
**See “systemctl status httpd.service” and “journalctl -xeu httpd.service” foudo systemctl status httpd.service && sudo journalctl -xeu httpd.service
× httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: failed (Result: exit-code) since Fri 2024-01-05 17:21:59 PST; 4min 26s ago
Docs: man:httpd.service(8)
Process: 9033 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 9033 (code=exited, status=1/FAILURE)
Status: “Reading configuration…”
CPU: 100ms
Jan 05 17:21:58 Root9 systemd[1]: Starting The Apache HTTP Server…
Jan 05 17:21:59 Root9 httpd[9033]: AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 143>
Jan 05 17:21:59 Root9 httpd[9033]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Jan 05 17:21:59 Root9 httpd[9033]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Jan 05 17:21:59 Root9 httpd[9033]: no listening sockets available, shutting down
Jan 05 17:21:59 Root9 httpd[9033]: AH00015: Unable to open logs
Jan 05 17:21:59 Root9 systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Jan 05 17:21:59 Root9 systemd[1]: httpd.service: Failed with result ‘exit-code’.
Jan 05 17:21:59 Root9 systemd[1]: Failed to start The Apache HTTP Server.
r details.**
This means the port 80 is already in use by another process. Close the application that is using this port, it could be nginx or maybe another web server you have installed.
To show all the listening and connected ports, run sudo netstat -nap
Scroll to the top and look at the process that is listening on port 80. You could also pipe that to grep 80.
I just want to thank you for all your help thus far. I truly appreciate it. Once, I pass this stage the project is done because I already installed everything else. With that being said, this is the only thing listening on port 80, should I close it out? Pending your response…
Yes you need to stop nginx if you want to run apache. Both will want port 80 but you cannot share ports between processes directly. You should be able to run sudo systemctl stop nginx
Wipe you VM and start from the beginning. Take care to look at the result of each step to make sure you are not getting an error. When you get an error, stop, fix it and then carry on.