How to install Apache2 Server in AWS EC2 Linux

After you have created and launched your EC2 instance you must be wondering what to do next?
if you enter your instance ip in your web browser nothing will show because you need to install a server to see some action!

It’s quite simple too!

I am showing all the steps on the Ubuntu EC2 instance but it will be same on any Linux instance.


First of all you need find Security Group option. find it in the left sidebar.

 Select inbound tab and click on edit option and add a new rule to allow all traffic like shown below. do the same with the outbound option.

Now login into your instance

aman@vostro:~$ ssh -i yourkeyfile.pem ubuntu@your-server-ip

finally, install apache2 web server.

sudo apt update
sudo apt install apache2

open up your browser and enter your ec2 server ip-address

you will be greeted with the apache2 ‘It works‘ default page.

 Done!

Leave a Reply

Your email address will not be published.