The server is a VPS running CentOS 7 64bit.
I'm trying to get the server to execute Perl scripts called by a browser (CGI). To this end I have a thread on the webmasters forum. But while trying to perform the recommended tasks to accomplish this I ran into some errors generated by the operating system. Specifically, the systemctl restart command fails.
[root@WANNABEsports /]# sudo systemctl restart httpd.service
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xe" for details.
Ran the commands in the error and received the following:
[root@WANNABEsports /]# systemctl status httpd.service -l
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2023-03-23 06:21:48 UTC; 3min 23s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 14999 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 14999 (code=exited, status=1/FAILURE)
Mar 23 06:21:48 WANNABEsports.name systemd[1]: Starting The Apache HTTP Server...
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: (98)Address already in use: AH00073: make_sock: unable to listen for connections on address [::]:80
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: (98)Address already in use: AH00073: make_sock: unable to listen for connections on address 0.0.0.0:80
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: no listening sockets available, shutting down
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: AH00015: Unable to open logs
Mar 23 06:21:48 WANNABEsports.name systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 23 06:21:48 WANNABEsports.name systemd[1]: Failed to start The Apache HTTP Server.
Mar 23 06:21:48 WANNABEsports.name systemd[1]: Unit httpd.service entered failed state.
Mar 23 06:21:48 WANNABEsports.name systemd[1]: httpd.service failed.
and . . .
[root@WANNABEsports /]# journalctl -xe
--
-- Unit httpd.service has begun starting up.
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: (98)Address already in use: AH00073: make_sock: unable to listen for connections on address [::]:80
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: (98)Address already in use: AH00073: make_sock: unable to listen for connections on address 0.0.0.0:80
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: no listening sockets available, shutting down
Mar 23 06:21:48 WANNABEsports.name httpd[14999]: AH00015: Unable to open logs
Mar 23 06:21:48 WANNABEsports.name systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 23 06:21:48 WANNABEsports.name systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Mar 23 06:21:48 WANNABEsports.name systemd[1]: Unit httpd.service entered failed state.
Mar 23 06:21:48 WANNABEsports.name systemd[1]: httpd.service failed.
Mar 23 06:21:48 WANNABEsports.name sudo[14995]: pam_unix(sudo:session): session closed for user root
I can see both contain reference to failure but don't understand what's needed to correct the situation.