Lab 3:To Configure Webserver on Amazon Linux instance with Elastic IP
Lab 3:To Configure Webserver on Amazon Linux instance with Elastic IP
Objective:To Configure Webserver and to verify using Elastic IP
Topology:
Pre-Requistes :
User should have AWS account ,or IAM user with EC2 full access
Task:
Lanuch linux instance in AWS
Switch to root user
Configure Apache Webserver
Enable HTTP port in Security Group
Open the browser and provide public ip or DNS_name of webserver
Assign an Elastic ip
Releasing an Elastic ip
1)Launch Amazon linux instance and login to your instance
Refer to lab[How to configure amazon linux instance]
2)Connect to linux instance from windows using Mobaxterm
open Mobaxterm
Click on on start local terminal
Go to Full screen mode
Navigate to the folder where key*.pem file is stored
Eg:cd e:/awskeys
Login to linux instance by typing the following command
ssh -i"keyorg123.pem"ec2-user@ec2-54-186-150-140-us-west-2.compute.amazonaws.com
Switch to root user
Type "sudo su"
Configure Apache Webserver run following commands as shown in screen
To use vi editor
Go to insert mode by typing "i" and add following code in index.html file
Note:[esc+shift+colon---> :wql (to save and quit in vi editor)]
3) Create an inbound Rule to Allow http traffic on port 80.
open the AWS console
on the EC2 Dashboard panel
Select the linux instance
Go the right end
select Security Groups
Click on Launch-wizard-1
Click on inbound button
Click on Edit button
Click on Add Rule button
Add Http Rule
Under Type column select HTTP
Under Source column select Anywhere
click save Button
4)Open Browser and provide Webserver instance DNS_name or public IP
Verify
Website is running
















Comments
Post a Comment