Host Static Website on EC2

RanaWat.Tech is a group of passionate designers and front-end developers of mobile and web applications. We are on a path to provide a nurturing environment for future developers and designers who are competent enough to learn and deliver great user experiences. We work in 7+ programming languages and various front-end frameworks to create our projects and provide effective & efficient solutions.
ranawat.tech is a new-born start-up ecosystem which functions in different ways.
ranawat.tech is growing into a community of smart, dedicated & highly skilled developers, UI/UX designers often referred to as the contributers. They are the growth engines of ranawat.tech.
ranawat.tech evaluates it's contributers on month-by-month basis. ranawat.tech's value contributers are rewarded with goodies and swags.
The contributers can sell & promote their own ready-made projects & designs on our platform at zero-commission costs.
Besides that RWT also works on custom on-demand projects in accordance with the customer requirements. So if you are really excited to work & contribute on a industry-level real time project than it's the perfect for you to start.
So, what you are waiting for? Join Now & start contributing!!
Also follow us on our social media platforms for such exciting opportunities and services.
Have a great day!! ๐๐ #Team@ranawat.tech
Problem Statement
Host A Static Website on EC2
Create an EC2 Machine with OS as Linux Amazon Linux 2
After Creating the instance Install the Apache Server and start the Apache service also make it a startup service so it can automatically start at the startup
Now change the Content of
index.htmlin directoryvar/www/html/toHello World
Solutions
Launch an EC2 instance by login into your AWS Account we are using Amazon Linux 2

Create a new key pair to connect to your instance.

Allow HTTP Traffic for your instance by enabling the checkbox.
Note: - Without HTTP Access your website is not accessible globally.

Now Connect to your Instance.

Now the most important steps.
Install the Apache Server By using Below Command
yum install โy httpd
Now start the Apache service by using below command
systemctl start httpd
Now to run Apache Service automatically at startup use the below command
systemctl enable httpd
Now to put your html code to the file use below command
echo โ<h1>Hello World</h1>โ /var/www/html/index.html
Now Access your website with the public IPV4 address.


