Setting-up webserver for ALB
- From this Lab we would to setup total of 5 instance with help of user-data
Make sure you select default security group while creating these EC2 - First, let create 2 instance with following bootstrap, in case if you have forgotten how to do it refer Lab 4.11
Name these two instance, Home-EC2#!/bin/bash yum install httpd -y service httpd start chkconfig httpd on echo "This is Homepage" > /var/www/html/index.html echo "Server is healthy" > /var/www/html/health.html
- Then 3 instance with following bootstrap
Name these three instance, Products-EC2#!/bin/bash yum install httpd -y service httpd start chkconfig httpd on cd /var/www/html mkdir products cd /var/www/html/products echo "This is Product Page" > products.html echo "Server is healthy" > /var/www/html/health.html
- With this our 5 instance are created for ALB setup