Skip to content

Commit

Permalink
ALB
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Cantrill authored and Adrian Cantrill committed Aug 13, 2019
1 parent 87ed37c commit f2ad5b5
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lesson_files/07_hybrid_scaling/1_LBandASG/ALB/bootstrap1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
yum install -y httpd php git

cd /var/www/html
wget https://github.com/linuxacademy/content-aws-csa2019/raw/master/lesson_files/07_hybrid_scaling/1_LBandASG/ALB/dog1.jpg
mv dog1.jpg dog.jpg
wget https://github.com/linuxacademy/content-aws-csa2019/raw/master/lesson_files/07_hybrid_scaling/1_LBandASG/ALB/index.php
mv /var/www/html/htaccess /var/www/html/.htaccess


sudo systemctl start httpd
sudo systemctl enable httpd
sudo usermod -a -G apache ec2-user
sudo chown -R ec2-user:apache /var/www
sudo chmod 2775 /var/www && find /var/www -type d -exec sudo chmod 2775 {} \;
find /var/www -type f -exec sudo chmod 0664 {} \;
16 changes: 16 additions & 0 deletions lesson_files/07_hybrid_scaling/1_LBandASG/ALB/bootstrap2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
yum install -y httpd php git

cd /var/www/html
wget https://github.com/linuxacademy/content-aws-csa2019/raw/master/lesson_files/07_hybrid_scaling/1_LBandASG/ALB/dog2.jpg
mv dog2.jpg dog.jpg
wget https://github.com/linuxacademy/content-aws-csa2019/raw/master/lesson_files/07_hybrid_scaling/1_LBandASG/ALB/index.php
mv /var/www/html/htaccess /var/www/html/.htaccess


sudo systemctl start httpd
sudo systemctl enable httpd
sudo usermod -a -G apache ec2-user
sudo chown -R ec2-user:apache /var/www
sudo chmod 2775 /var/www && find /var/www -type d -exec sudo chmod 2775 {} \;
find /var/www -type f -exec sudo chmod 0664 {} \;
16 changes: 16 additions & 0 deletions lesson_files/07_hybrid_scaling/1_LBandASG/ALB/bootstrap3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
yum install -y httpd php git

cd /var/www/html
wget https://github.com/linuxacademy/content-aws-csa2019/raw/master/lesson_files/07_hybrid_scaling/1_LBandASG/ALB/dog3.jpg
mv dog3.jpg dog.jpg
wget https://github.com/linuxacademy/content-aws-csa2019/raw/master/lesson_files/07_hybrid_scaling/1_LBandASG/ALB/index.php
mv /var/www/html/htaccess /var/www/html/.htaccess


sudo systemctl start httpd
sudo systemctl enable httpd
sudo usermod -a -G apache ec2-user
sudo chown -R ec2-user:apache /var/www
sudo chmod 2775 /var/www && find /var/www -type d -exec sudo chmod 2775 {} \;
find /var/www -type f -exec sudo chmod 0664 {} \;
1 change: 1 addition & 0 deletions lesson_files/07_hybrid_scaling/1_LBandASG/ALB/htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RewriteRule ^index\.htm$ index.php [NC,R]
14 changes: 14 additions & 0 deletions lesson_files/07_hybrid_scaling/1_LBandASG/ALB/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<html>
<title> LA ALB DEMO </title>
<body>
<h1>
<center>
<IMG SRC="dog.jpg" ALT="omg"><br>
<?php
$eip = file_get_contents('http://169.254.169.254/latest/meta-data/public-ipv4');
echo $eip;
?>
</center>
</h1>
</body>
</html>

0 comments on commit f2ad5b5

Please sign in to comment.