Follow Linode install Apache server on Centos 8 guide but stuck on last step

Document link: https://www.linode.com/docs/guides/install-magento-2-4-on-centos-8/#web-server

When I run commend

sudo systemctl start httpd.service

Console gives me the following errors.

[[email protected] sites-available]# systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2021-09-20 18:12:36 UTC; 8s ago
Docs: man:httpd.service(8)
Process: 28117 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 28117 (code=exited, status=1/FAILURE)
Status: "Reading configuration…"
Sep 20 18:12:36 li1077-239.members.linode.com systemd[1]: Starting The Apache HTTP Server…
Sep 20 18:12:36 li1077-239.members.linode.com systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Sep 20 18:12:36 li1077-239.members.linode.com systemd[1]: httpd.service: Failed with result 'exit-code'.
Sep 20 18:12:36 li1077-239.members.linode.com systemd[1]: Failed to start The Apache HTTP Server.

And

[[email protected] sites-available]# journalctl -xe
Sep 20 18:17:11 li1077-239.members.linode.com unix_chkpwd[28180]: password check failed for user (root)
Sep 20 18:17:12 li1077-239.members.linode.com sshd[28176]: Failed password for root from 222.186.42.13 port 53544 ssh2
Sep 20 18:17:12 li1077-239.members.linode.com unix_chkpwd[28181]: password check failed for user (root)
Sep 20 18:17:13 li1077-239.members.linode.com sshd[28172]: Failed password for root from 221.181.185.151 port 54935 ssh2
Sep 20 18:17:14 li1077-239.members.linode.com sshd[28172]: Received disconnect from 221.181.185.151 port 54935:11: [preauth]
Sep 20 18:17:14 li1077-239.members.linode.com sshd[28172]: Disconnected from authenticating user root 221.181.185.151 port 54935 [preauth]
Sep 20 18:17:14 li1077-239.members.linode.com sshd[28172]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.151 user=root
Sep 20 18:17:14 li1077-239.members.linode.com sshd[28176]: Failed password for root from 222.186.42.13 port 53544 ssh2
Sep 20 18:17:15 li1077-239.members.linode.com unix_chkpwd[28182]: password check failed for user (root)
Sep 20 18:17:18 li1077-239.members.linode.com sshd[28176]: Failed password for root from 222.186.42.13 port 53544 ssh2
Sep 20 18:17:18 li1077-239.members.linode.com sshd[28176]: Received disconnect from 222.186.42.13 port 53544:11: [preauth]
Sep 20 18:17:18 li1077-239.members.linode.com sshd[28176]: Disconnected from authenticating user root 222.186.42.13 port 53544 [preauth]
Sep 20 18:17:18 li1077-239.members.linode.com sshd[28176]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=222.186.42.13 user=root
Sep 20 18:17:20 li1077-239.members.linode.com unix_chkpwd[28185]: password check failed for user (root)
Sep 20 18:17:20 li1077-239.members.linode.com sshd[28183]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=222.186.42.13 user=root
Sep 20 18:17:22 li1077-239.members.linode.com sshd[28183]: Failed password for root from 222.186.42.13 port 16492 ssh2
Sep 20 18:17:23 li1077-239.members.linode.com unix_chkpwd[28186]: password check failed for user (root)
Sep 20 18:17:24 li1077-239.members.linode.com sshd[28183]: Failed password for root from 222.186.42.13 port 16492 ssh2
Sep 20 18:17:25 li1077-239.members.linode.com unix_chkpwd[28187]: password check failed for user (root)
Sep 20 18:17:27 li1077-239.members.linode.com sshd[28183]: Failed password for root from 222.186.42.13 port 16492 ssh2
Sep 20 18:17:28 li1077-239.members.linode.com sshd[28183]: Received disconnect from 222.186.42.13 port 16492:11: [preauth]
Sep 20 18:17:28 li1077-239.members.linode.com sshd[28183]: Disconnected from authenticating user root 222.186.42.13 port 16492 [preauth]
Sep 20 18:17:28 li1077-239.members.linode.com sshd[28183]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=222.186.42.13 user=root
Sep 20 18:17:35 li1077-239.members.linode.com unix_chkpwd[28190]: password check failed for user (root)
Sep 20 18:17:35 li1077-239.members.linode.com sshd[28188]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=222.186.42.13 user=root
Sep 20 18:17:37 li1077-239.members.linode.com sshd[28188]: Failed password for root from 222.186.42.13 port 16410 ssh2
Sep 20 18:17:38 li1077-239.members.linode.com unix_chkpwd[28191]: password check failed for user (root)
Sep 20 18:17:40 li1077-239.members.linode.com sshd[28188]: Failed password for root from 222.186.42.13 port 16410 ssh2
Sep 20 18:17:41 li1077-239.members.linode.com unix_chkpwd[28192]: password check failed for user (root)
Sep 20 18:17:42 li1077-239.members.linode.com sshd[28188]: Failed password for root from 222.186.42.13 port 16410 ssh2
Sep 20 18:17:44 li1077-239.members.linode.com sshd[28188]: Received disconnect from 222.186.42.13 port 16410:11: [preauth]
Sep 20 18:17:44 li1077-239.members.linode.com sshd[28188]: Disconnected from authenticating user root 222.186.42.13 port 16410 [preauth]
Sep 20 18:17:44 li1077-239.members.linode.com sshd[28188]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=222.186.42.13 user=root
Sep 20 18:18:18 li1077-239.members.linode.com unix_chkpwd[28195]: password check failed for user (root)
Sep 20 18:18:18 li1077-239.members.linode.com sshd[28193]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=61.177.173.23 user=root
Sep 20 18:18:20 li1077-239.members.linode.com sshd[28193]: Failed password for root from 61.177.173.23 port 22810 ssh2
Sep 20 18:18:21 li1077-239.members.linode.com unix_chkpwd[28196]: password check failed for user (root)
Sep 20 18:18:23 li1077-239.members.linode.com sshd[28193]: Failed password for root from 61.177.173.23 port 22810 ssh2
Sep 20 18:18:23 li1077-239.members.linode.com unix_chkpwd[28197]: password check failed for user (root)
Sep 20 18:18:25 li1077-239.members.linode.com sshd[28193]: Failed password for root from 61.177.173.23 port 22810 ssh2
Sep 20 18:18:26 li1077-239.members.linode.com sshd[28193]: Received disconnect from 61.177.173.23 port 22810:11: [preauth]
Sep 20 18:18:26 li1077-239.members.linode.com sshd[28193]: Disconnected from authenticating user root 61.177.173.23 port 22810 [preauth]
Sep 20 18:18:26 li1077-239.members.linode.com sshd[28193]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=61.177.173.23 user=root

1 Reply

It looks like your journalctl -xe output got flooded with failed login attempts from various IP addresses and therefore didn't capture anything telling about httpd.service, at least in the portion shared to this post.

The next-best place to look for any clues here would be your Apache logs, as they may contain more direct information about what went awry:

tail -f /var/log/httpd/error_log

We also have a useful guide on how to troubleshoot Apache - along with checking your logs there are other suggestions within:

https://www.linode.com/docs/guides/troubleshooting-common-apache-issues/

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct