forked from linuxacademy/content-aws-csa2019
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Adrian Cantrill
authored and
Adrian Cantrill
committed
Aug 13, 2019
1 parent
87ed37c
commit f2ad5b5
Showing
5 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
lesson_files/07_hybrid_scaling/1_LBandASG/ALB/bootstrap1.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
16
lesson_files/07_hybrid_scaling/1_LBandASG/ALB/bootstrap2.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
16
lesson_files/07_hybrid_scaling/1_LBandASG/ALB/bootstrap3.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
RewriteRule ^index\.htm$ index.php [NC,R] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |