yum install httpd -yDefault install directory /var/www/html
systemctl start httpd[root@ip-xxx-xxx-xxx-xxx ec2-user]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@ip-xxx-xxx-xxx-xxx ec2-user]# [root@ip-xxx-xxx-xxx-xxx ec2-user]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: active (running) since Mon 2023-07-03 03:20:29 UTC; 58s ago
Docs: man:httpd.service(8)
Main PID: 2869 (httpd)
Status: "Total requests: 0; Idle/Busy workers 100/0;Requests/sec: 0; Bytes served/sec: 0 B/sec"
CGroup: /system.slice/httpd.service
├─2869 /usr/sbin/httpd -DFOREGROUND
├─2870 /usr/sbin/httpd -DFOREGROUND
├─2872 /usr/sbin/httpd -DFOREGROUND
├─2884 /usr/sbin/httpd -DFOREGROUND
├─2894 /usr/sbin/httpd -DFOREGROUND
└─2900 /usr/sbin/httpd -DFOREGROUND
Jul 03 03:20:29 ip-xxx-xxx-xxx-xxx.ec2.internal systemd[1]: Starting The Apache HTTP Server...
Jul 03 03:20:29 ip-xxx-xxx-xxx-xxx.ec2.internal systemd[1]: Started The Apache HTTP Server.
[root@ip-xxx-xxx-xxx-xxx ec2-user]#