In security group allow http,https from anywhere as we will be accsessing the site from our browser
We will be hosting the site on http server Httpd is the Apache HyperText Transfer Protocol (HTTP) server program. It lets us to host our webpage on apache server
sudo su
systemctl install httpd
Systemctl is a command-line tool that allows for the management and monitoring of the systemd system and service manager get httpd to install httpd service on the server
cd /var/www/html
changing the directory to html , all the files for hosting will be stored here
nano index.html
editing the index file for hosting the page and saving it
<html>
<body>
hi this is rishi visting my page on ec2
</body>
</html>
systemctl enable httpd
to enable the httpd service
systemctl start httpd
to start the httpd service
systemctl status httpd
checking the status active or inactive
now we can access the site by copying and pasting the public IPv4 in our browser